Examples of register()


Examples of org.apache.flume.channel.DefaultChannelFactory.register()

  public void setUp() {
    ChannelFactory channelFactory = new DefaultChannelFactory();
    SourceFactory sourceFactory = new DefaultSourceFactory();
    SinkFactory sinkFactory = new DefaultSinkFactory();

    channelFactory.register("memory", MemoryChannel.class);

    sourceFactory.register("seq", SequenceGeneratorSource.class);
    sourceFactory.register("netcat", NetcatSource.class);

    sinkFactory.register("null", NullSink.class);

Examples of org.apache.flume.sink.DefaultSinkFactory.register()

    channelFactory.register("memory", MemoryChannel.class);

    sourceFactory.register("seq", SequenceGeneratorSource.class);
    sourceFactory.register("netcat", NetcatSource.class);

    sinkFactory.register("null", NullSink.class);
    sinkFactory.register("logger", LoggerSink.class);

    provider = new JsonFileConfigurationProvider();

    provider.setNodeName("localhost");

Examples of org.apache.flume.source.DefaultSourceFactory.register()

    SourceFactory sourceFactory = new DefaultSourceFactory();
    SinkFactory sinkFactory = new DefaultSinkFactory();

    channelFactory.register("memory", MemoryChannel.class);

    sourceFactory.register("seq", SequenceGeneratorSource.class);
    sourceFactory.register("netcat", NetcatSource.class);

    sinkFactory.register("null", NullSink.class);
    sinkFactory.register("logger", LoggerSink.class);

Examples of org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol.register()

      FLOG.info("Connecting to the primary namenode: " + nameNodeAddr);
      primaryNamenode = (NamenodeProtocol) RPC.waitForProxy(
          NamenodeProtocol.class, NamenodeProtocol.versionID, nameNodeAddr,
          conf);
      // make sure we can talk to this primary
      int primaryDataTransferVersion = primaryNamenode.register();
      // check if we have the same data transfer version as primary
      InjectionHandler.processEventIO(
          InjectionEvent.AVATARNODE_RECEIVED_DATA_TRANSFER_VERSION, primaryDataTransferVersion);
      int standbyDataTransferVersion = DataTransferProtocol.DATA_TRANSFER_VERSION;
      if (standbyDataTransferVersion != primaryDataTransferVersion && !startInfo.forceStartup) {

Examples of org.apache.hadoop.metrics2.MetricsSystem.register()

  @Test public void testRegisterDups() {
    MetricsSystem ms = new MetricsSystemImpl();
    TestSource ts1 = new TestSource("ts1");
    TestSource ts2 = new TestSource("ts2");
    ms.register("ts1", "", ts1);
    MetricsSource s1 = ms.getSource("ts1");
    assertNotNull(s1);
    // should work when metrics system is not started
    ms.register("ts1", "", ts2);
    MetricsSource s2 = ms.getSource("ts1");

Examples of org.apache.hadoop.yarn.event.AsyncDispatcher.register()

    AsyncDispatcher dispatcher = new AsyncDispatcher();
    dispatcher.init(conf);
    dispatcher.start();

    TestingJobEventHandler jeh = new TestingJobEventHandler();
    dispatcher.register(JobEventType.class, jeh);

    SystemClock clock = new SystemClock();
    AppContext appContext = mock(AppContext.class);
    ApplicationAttemptId attemptid =
      ConverterUtils.toApplicationAttemptId("appattempt_1234567890000_0001_0");

Examples of org.apache.hadoop.yarn.event.Dispatcher.register()

  /**
   * Register the handlers for alwaysOn services
   */
  private Dispatcher setupDispatcher() {
    Dispatcher dispatcher = createDispatcher();
    dispatcher.register(RMFatalEventType.class,
        new ResourceManager.RMFatalEventDispatcher(this.rmContext, this));
    return dispatcher;
  }

  private void resetDispatcher() {

Examples of org.apache.hadoop.yarn.event.DrainDispatcher.register()

  public void testReleaseWhileRunning() {

    DrainDispatcher drainDispatcher = new DrainDispatcher();
    EventHandler<RMAppAttemptEvent> appAttemptEventHandler = mock(EventHandler.class);
    EventHandler generic = mock(EventHandler.class);
    drainDispatcher.register(RMAppAttemptEventType.class,
        appAttemptEventHandler);
    drainDispatcher.register(RMNodeEventType.class, generic);
    drainDispatcher.init(new YarnConfiguration());
    drainDispatcher.start();
    NodeId nodeId = BuilderUtils.newNodeId("host", 3425);

Examples of org.apache.hadoop.yarn.event.InlineDispatcher.register()

            return null;
          }
        }
        ).when(scheduler).handle(any(SchedulerEvent.class));
   
    rmDispatcher.register(SchedulerEventType.class,
        new TestSchedulerEventDispatcher());
   
    rmDispatcher.register(NodesListManagerEventType.class,
        new TestNodeListManagerEventDispatcher());

Examples of org.apache.hadoop.yarn.server.resourcemanager.resourcetracker.InlineDispatcher.register()

            return null;
          }
        }
        ).when(scheduler).handle(any(SchedulerEvent.class));
   
    rmDispatcher.register(SchedulerEventType.class,
        new TestSchedulerEventDispatcher());
   
    NodeId nodeId = BuilderUtils.newNodeId("localhost", 0);
    node = new RMNodeImpl(nodeId, rmContext, null, 0, 0, null, null);
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.