Package org.springframework.xd.integration.hadoop.outbound

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


      HdfsTextFileWriterFactory writerFactory = new HdfsTextFileWriterFactory(this.fileSystem);
      writerFactory.setBasePath(this.basePath);
      writerFactory.setBaseFilename(this.baseFilename);
      writerFactory.setFileSuffix(fileSuffix);
      writerFactory.setRolloverThresholdInBytes(rolloverThresholdInBytes);
      this.handler = new HdfsWritingMessageHandler(writerFactory);
      if (this.autoStartup != null) {
        this.handler.setAutoStartup(this.autoStartup);
      }
    }
    return this.handler;
View Full Code Here


  @Override
  public synchronized HdfsWritingMessageHandler getObject() throws Exception {
    if (handler == null) {
      DatasetWriterFactory writerFactory = new DatasetWriterFactory(this.datasetOperations);
      this.handler = new HdfsWritingMessageHandler(writerFactory);
      if (this.autoStartup != null) {
        this.handler.setAutoStartup(this.autoStartup);
      }
    }
    return this.handler;
View Full Code Here

  @Test
  public void testParser() {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
        "org/springframework/xd/integration/hadoop/config/DatasetOutboundChannelAdapterParserTests.xml");
    EventDrivenConsumer adapter = context.getBean("adapter", EventDrivenConsumer.class);
    HdfsWritingMessageHandler handler = (HdfsWritingMessageHandler) new DirectFieldAccessor(adapter).getPropertyValue("handler");
    DirectFieldAccessor handlerAccessor = new DirectFieldAccessor(handler);
    assertEquals(false, handlerAccessor.getPropertyValue("autoStartup"));
    DatasetWriterFactory writerFactory = (DatasetWriterFactory) handlerAccessor.getPropertyValue("hdfsWriterFactory");
    DatasetOperations datasetOperations = (DatasetOperations) new DirectFieldAccessor(writerFactory).getPropertyValue("datasetOperations");
    assertEquals(context.getBean("datasetOperations"), datasetOperations);
View Full Code Here

TOP

Related Classes of org.springframework.xd.integration.hadoop.outbound.HdfsWritingMessageHandler

Copyright © 2018 www.massapicom. 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.