Package org.apache.flume

Examples of org.apache.flume.SinkFactory.create()


  
  
    @Test
    public void testSinkCreation() {
        SinkFactory factory = new DefaultSinkFactory ();
        Sink sink = factory.create("PhoenixSink__", "org.apache.phoenix.flume.sink.PhoenixSink");
        Assert.assertNotNull(sink);
        Assert.assertTrue(PhoenixSink.class.isInstance(sink));
    }
    @Test
    public void testConfiguration () {
View Full Code Here


    context.put("type", FailoverSinkProcessor.class.getName());
    context.put("priority.sink1", "1");
    context.put("priority.sink2", "2");
    SinkFactory sf = new DefaultSinkFactory();
    List<Sink> sinks = new ArrayList<Sink>();
    sinks.add(sf.create("sink1", "avro"));
    sinks.add(sf.create("sink2", "avro"));
    SinkProcessor sp = SinkProcessorFactory.getProcessor(context, sinks);
    context.put("type", "failover");
    SinkProcessor sp2 = SinkProcessorFactory.getProcessor(context, sinks);
    Assert.assertEquals(sp.getClass(), sp2.getClass());
View Full Code Here

    context.put("priority.sink1", "1");
    context.put("priority.sink2", "2");
    SinkFactory sf = new DefaultSinkFactory();
    List<Sink> sinks = new ArrayList<Sink>();
    sinks.add(sf.create("sink1", "avro"));
    sinks.add(sf.create("sink2", "avro"));
    SinkProcessor sp = SinkProcessorFactory.getProcessor(context, sinks);
    context.put("type", "failover");
    SinkProcessor sp2 = SinkProcessorFactory.getProcessor(context, sinks);
    Assert.assertEquals(sp.getClass(), sp2.getClass());
  }
View Full Code Here

    Context context = new Context();
    context.put("type", LoadBalancingSinkProcessor.class.getName());
    context.put("selector", "random");
    SinkFactory sf = new DefaultSinkFactory();
    List<Sink> sinks = new ArrayList<Sink>();
    sinks.add(sf.create("sink1", "avro"));
    sinks.add(sf.create("sink2", "avro"));
    SinkProcessor sp = SinkProcessorFactory.getProcessor(context, sinks);
    context.put("type", "load_balance");
    SinkProcessor sp2 = SinkProcessorFactory.getProcessor(context, sinks);
    Assert.assertEquals(sp.getClass(), sp2.getClass());
View Full Code Here

    context.put("type", LoadBalancingSinkProcessor.class.getName());
    context.put("selector", "random");
    SinkFactory sf = new DefaultSinkFactory();
    List<Sink> sinks = new ArrayList<Sink>();
    sinks.add(sf.create("sink1", "avro"));
    sinks.add(sf.create("sink2", "avro"));
    SinkProcessor sp = SinkProcessorFactory.getProcessor(context, sinks);
    context.put("type", "load_balance");
    SinkProcessor sp2 = SinkProcessorFactory.getProcessor(context, sinks);
    Assert.assertEquals(sp.getClass(), sp2.getClass());
  }
View Full Code Here

  
  
    @Test
    public void testSinkCreation() {
        SinkFactory factory = new DefaultSinkFactory ();
        Sink sink = factory.create("PhoenixSink__", "org.apache.phoenix.flume.sink.PhoenixSink");
        Assert.assertNotNull(sink);
        Assert.assertTrue(PhoenixSink.class.isInstance(sink));
    }
    @Test
    public void testConfiguration () {
View Full Code Here

  
  
    @Test
    public void testSinkCreation() {
        SinkFactory factory = new DefaultSinkFactory ();
        Sink sink = factory.create("PhoenixSink__", "com.salesforce.phoenix.flume.sink.PhoenixSink");
        Assert.assertNotNull(sink);
        Assert.assertTrue(PhoenixSink.class.isInstance(sink));
    }
    @Test
    public void testConfiguration () {
View Full Code Here

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.