Package org.springframework.data.hadoop.store.strategy.naming

Examples of org.springframework.data.hadoop.store.strategy.naming.ChainedFileNamingStrategy.resolve()


    support.setInWritingSuffix(".tmp");
    support.setFileNamingStrategy(strategy);

    TestUtils.callMethod("initOutputContext", support);
    assertThat(strategy.resolve(null).toString(), is("base-fakeuuid-0-1.extension"));
  }

  @Test
  public void testFindFiles2() throws Exception {
    List<FileNamingStrategy> strategies = new ArrayList<FileNamingStrategy>();
View Full Code Here


    support.setInWritingSuffix(".tmp");
    support.setFileNamingStrategy(strategy);

    TestUtils.callMethod("initOutputContext", support);
    assertThat(strategy.resolve(null).toString(), is("base-fakeuuid-2-0.extension"));
  }

  @Test
  public void testFindFiles3() throws Exception {
    List<FileNamingStrategy> strategies1 = new ArrayList<FileNamingStrategy>();
View Full Code Here

    TestOutputStoreObjectSupport support2 = new TestOutputStoreObjectSupport(new Configuration(), mockPath, null);
    support2.setInWritingSuffix(".tmp");
    support2.setFileNamingStrategy(strategy2);
    TestUtils.callMethod("initOutputContext", support2);
    assertThat(strategy2.resolve(null).toString(), is("base-fakeuuid-1-2.extension"));
  }

  private static class TestOutputStoreObjectSupport extends OutputStoreObjectSupport {

    public TestOutputStoreObjectSupport(Configuration configuration, Path basePath, CodecInfo codec) {
View Full Code Here

  @Test
  public void testSimpleNaming() throws Exception {
    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
        "org/springframework/xd/integration/hadoop/config/NamingStrategyParserTests.xml");
    ChainedFileNamingStrategy strategy = context.getBean(ChainedFileNamingStrategy.class);
    assertThat(strategy.resolve(null).toString(), is("base-fakeuuid-0.extension"));
    context.close();
  }

}
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.