Examples of HdfsStoreMessageHandler


Examples of org.springframework.xd.integration.hadoop.outbound.HdfsStoreMessageHandler

  @SuppressWarnings("unchecked")
  @Override
  protected HdfsStoreMessageHandler createHandler() {
    Assert.notNull(storeWriter, "Writer cannot be null for this factory");
    HdfsStoreMessageHandler handler = null;
    if (storeWriter instanceof PartitionDataStoreWriter) {
      handler = new HdfsPartitionDataStoreMessageHandler((PartitionDataStoreWriter) storeWriter);
    }
    else {
      handler = new HdfsDataStoreMessageHandler(storeWriter);
    }
    handler.setAutoStartup(autoStartup);
    return handler;
  }
View Full Code Here

Examples of org.springframework.xd.integration.hadoop.outbound.HdfsStoreMessageHandler

  @Test
  public void test() {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
        "org/springframework/xd/integration/hadoop/config/HdfsOutboundChannelAdapterParserTests.xml");
    EventDrivenConsumer adapter = context.getBean("adapter", EventDrivenConsumer.class);
    HdfsStoreMessageHandler handler = (HdfsStoreMessageHandler) new DirectFieldAccessor(adapter).getPropertyValue("handler");
    DirectFieldAccessor handlerAccessor = new DirectFieldAccessor(handler);
    assertEquals(false, handlerAccessor.getPropertyValue("autoStartup"));

    TextFileWriter storeWriter = (TextFileWriter) handlerAccessor.getPropertyValue("storeWriter");
    assertNotNull(storeWriter);
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.