Example usage for org.apache.hadoop.registry.client.api RegistryOperations init

List of usage examples for org.apache.hadoop.registry.client.api RegistryOperations init

Introduction

In this page you can find the example usage for org.apache.hadoop.registry.client.api RegistryOperations init.

Prototype

void init(Configuration config);

Source Link

Document

Initialize the service.

Usage

From source file:org.apache.slider.providers.agent.TestAgentProviderService.java

License:Apache License

protected YarnRegistryViewForProviders createYarnRegistryViewForProviders(Configuration conf)
        throws IOException {
    conf.set(SliderXmlConfKeys.REGISTRY_PATH, SliderXmlConfKeys.DEFAULT_REGISTRY_PATH);

    RegistryOperations registryOperations = new MockRegistryOperations();
    registryOperations.init(conf);
    YarnRegistryViewForProviders registryViewForProviders = new YarnRegistryViewForProviders(registryOperations,
            "hbase", SliderKeys.APP_TYPE, "hbase1", new MockApplicationAttemptId(new MockApplicationId(1), 1));
    registryViewForProviders.registerSelf(new ServiceRecord(), true);
    return registryViewForProviders;
}