@Test public void testFlattenedAndNestedOrcProps() throws Exception { String testConfFilePath = "convertibleHiveDatasetTest/flattenedAndNestedOrc.properties"; Properties jobProps = new Properties(); try (final InputStream stream = ConvertibleHiveDatasetTest.class.getClassLoader().getResourceAsStream(testConfFilePath)) { jobProps.load(stream); } Config config = ConfigUtils.propertiesToConfig(jobProps).getConfig("hive.conversion.avro"); ConvertibleHiveDataset cd = createTestConvertibleDataset(config); Assert.assertEquals(cd.getDestFormats(), ImmutableSet.of("flattenedOrc", "nestedOrc")); Assert.assertTrue(cd.getConversionConfigForFormat("flattenedOrc").isPresent()); Assert.assertTrue(cd.getConversionConfigForFormat("nestedOrc").isPresent()); validateFlattenedConfig(cd.getConversionConfigForFormat("flattenedOrc").get()); validateNestedOrc(cd.getConversionConfigForFormat("nestedOrc").get()); }
public Optional<ConversionConfig> getConversionConfigForFormat(String format) { return Optional.fromNullable(this.destConversionConfigs.get(format)); }
ConvertibleHiveDataset extends HiveDataset { public Optional<ConversionConfig> getConversionConfigForFormat(String format) { return Optional.fromNullable(this.destConversionConfigs.get(format)); } }
ConvertibleHiveDataset extends HiveDataset { public Optional<ConversionConfig> getConversionConfigForFormat(String format) { return Optional.fromNullable(this.destConversionConfigs.get(format)); } ConvertibleHiveDataset(FileSystem fs, HiveMetastoreClientPool clientPool, Table table, Properties jobProps, Config config); }
ConvertibleHiveDataset extends HiveDataset { public Optional<ConversionConfig> getConversionConfigForFormat(String format) { return Optional.fromNullable(this.destConversionConfigs.get(format)); } ConvertibleHiveDataset(FileSystem fs, HiveMetastoreClientPool clientPool, Table table, Properties jobProps, Config config); Optional<ConversionConfig> getConversionConfigForFormat(String format); }
ConvertibleHiveDataset extends HiveDataset { public Optional<ConversionConfig> getConversionConfigForFormat(String format) { return Optional.fromNullable(this.destConversionConfigs.get(format)); } ConvertibleHiveDataset(FileSystem fs, HiveMetastoreClientPool clientPool, Table table, Properties jobProps, Config config); Optional<ConversionConfig> getConversionConfigForFormat(String format); static final String DESTINATION_CONVERSION_FORMATS_KEY; }