target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void nowAmericaLosAngeles() { DateTime now = ExpressionParserFunctions.nowAmericaLosAngeles(); assertThat(now.getZone(), is(DateTimeZone.forID("America/Los_Angeles"))); }
public static DateTime nowAmericaLosAngeles() { return nowInZone("America/Los_Angeles"); }
ExpressionParserFunctions { public static DateTime nowAmericaLosAngeles() { return nowInZone("America/Los_Angeles"); } }
ExpressionParserFunctions { public static DateTime nowAmericaLosAngeles() { return nowInZone("America/Los_Angeles"); } private ExpressionParserFunctions(); }
ExpressionParserFunctions { public static DateTime nowAmericaLosAngeles() { return nowInZone("America/Los_Angeles"); } private ExpressionParserFunctions(); static DateTime nowInZone(String zone); static DateTime nowUtc(); static DateTime nowEuropeLondon(); static DateTime nowAmericaLosAngeles(); static String zeroPadL...
ExpressionParserFunctions { public static DateTime nowAmericaLosAngeles() { return nowInZone("America/Los_Angeles"); } private ExpressionParserFunctions(); static DateTime nowInZone(String zone); static DateTime nowUtc(); static DateTime nowEuropeLondon(); static DateTime nowAmericaLosAngeles(); static String zeroPadL...
@Test public void typical() throws Exception { ArgumentCaptor<Instant> instantCaptor = ArgumentCaptor.forClass(Instant.class); runner.run(null); verify(cleanUpPathService).cleanUp(instantCaptor.capture()); Instant twoDaysAgo = new Instant().minus(TWO_DAYS_DURATION.getMillis()); assertThat(instantCaptor.getValue().getMi...
@Override public void run(ApplicationArguments args) { Instant deletionCutoff = new Instant().minus(housekeeping.getExpiredPathDuration()); LOG.info("Housekeeping at instant {} has started", deletionCutoff); CompletionCode completionCode = CompletionCode.SUCCESS; try { housekeepingService.cleanUp(deletionCutoff); LOG.i...
HousekeepingRunner implements ApplicationRunner { @Override public void run(ApplicationArguments args) { Instant deletionCutoff = new Instant().minus(housekeeping.getExpiredPathDuration()); LOG.info("Housekeeping at instant {} has started", deletionCutoff); CompletionCode completionCode = CompletionCode.SUCCESS; try { ...
HousekeepingRunner implements ApplicationRunner { @Override public void run(ApplicationArguments args) { Instant deletionCutoff = new Instant().minus(housekeeping.getExpiredPathDuration()); LOG.info("Housekeeping at instant {} has started", deletionCutoff); CompletionCode completionCode = CompletionCode.SUCCESS; try { ...
HousekeepingRunner implements ApplicationRunner { @Override public void run(ApplicationArguments args) { Instant deletionCutoff = new Instant().minus(housekeeping.getExpiredPathDuration()); LOG.info("Housekeeping at instant {} has started", deletionCutoff); CompletionCode completionCode = CompletionCode.SUCCESS; try { ...
HousekeepingRunner implements ApplicationRunner { @Override public void run(ApplicationArguments args) { Instant deletionCutoff = new Instant().minus(housekeeping.getExpiredPathDuration()); LOG.info("Housekeeping at instant {} has started", deletionCutoff); CompletionCode completionCode = CompletionCode.SUCCESS; try { ...
@Test public void zeroPadLeftString() { assertThat(ExpressionParserFunctions.zeroPadLeft("A", 3), is("00A")); assertThat(ExpressionParserFunctions.zeroPadLeft("AAA", 3), is("AAA")); assertThat(ExpressionParserFunctions.zeroPadLeft("", 1), is("0")); }
public static String zeroPadLeft(int value, int width) { return zeroPadLeft(Integer.toString(value), width); }
ExpressionParserFunctions { public static String zeroPadLeft(int value, int width) { return zeroPadLeft(Integer.toString(value), width); } }
ExpressionParserFunctions { public static String zeroPadLeft(int value, int width) { return zeroPadLeft(Integer.toString(value), width); } private ExpressionParserFunctions(); }
ExpressionParserFunctions { public static String zeroPadLeft(int value, int width) { return zeroPadLeft(Integer.toString(value), width); } private ExpressionParserFunctions(); static DateTime nowInZone(String zone); static DateTime nowUtc(); static DateTime nowEuropeLondon(); static DateTime nowAmericaLosAngeles(); st...
ExpressionParserFunctions { public static String zeroPadLeft(int value, int width) { return zeroPadLeft(Integer.toString(value), width); } private ExpressionParserFunctions(); static DateTime nowInZone(String zone); static DateTime nowUtc(); static DateTime nowEuropeLondon(); static DateTime nowAmericaLosAngeles(); st...
@Test public void zeroPadLeftInt() { assertThat(ExpressionParserFunctions.zeroPadLeft(1, 3), is("001")); assertThat(ExpressionParserFunctions.zeroPadLeft(111, 3), is("111")); }
public static String zeroPadLeft(int value, int width) { return zeroPadLeft(Integer.toString(value), width); }
ExpressionParserFunctions { public static String zeroPadLeft(int value, int width) { return zeroPadLeft(Integer.toString(value), width); } }
ExpressionParserFunctions { public static String zeroPadLeft(int value, int width) { return zeroPadLeft(Integer.toString(value), width); } private ExpressionParserFunctions(); }
ExpressionParserFunctions { public static String zeroPadLeft(int value, int width) { return zeroPadLeft(Integer.toString(value), width); } private ExpressionParserFunctions(); static DateTime nowInZone(String zone); static DateTime nowUtc(); static DateTime nowEuropeLondon(); static DateTime nowAmericaLosAngeles(); st...
ExpressionParserFunctions { public static String zeroPadLeft(int value, int width) { return zeroPadLeft(Integer.toString(value), width); } private ExpressionParserFunctions(); static DateTime nowInZone(String zone); static DateTime nowUtc(); static DateTime nowEuropeLondon(); static DateTime nowAmericaLosAngeles(); st...
@Test public void literal() { assertThat(parser.parse("local_hour > 0"), is("local_hour > 0")); }
public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; }
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } }
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
@Test public void empty() { assertThat(parser.parse(""), is("")); }
public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; }
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } }
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
@Test public void blank() { assertThat(parser.parse(" "), is(" ")); }
public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; }
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } }
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
@Test public void nullValue() { assertThat(parser.parse(null), is((Object) null)); }
public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; }
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } }
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
@Test public void literalWithNowFunction() { assertThat(parser.parse("local_date > #{ #now().minusDays(30).toString('yyyy-MM-dd')}"), is("local_date > 2016-02-23")); }
public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; }
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } }
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
@Test public void spaceBeforeRootContextReference() { assertThat(parser.parse("local_date >= '#{ #nowUtc().minusDays(2).toString(\"yyyy-MM-dd\") }'"), is("local_date >= '2016-03-22'")); }
public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; }
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } }
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
SpringExpressionParser { public String parse(String expressionString) { if (expressionString != null) { Expression expression = parser.parseExpression(expressionString, templateContext); expressionString = expression.getValue(evalContext).toString(); } return expressionString; } SpringExpressionParser(); SpringExpres...
@Test public void scheduleLocations() throws Exception { HousekeepingCleanupLocationManager manager = new HousekeepingCleanupLocationManager(EVENT_ID, housekeepingListener, replicaCatalogListener, DATABASE, TABLE); String pathEventId = "pathEventId"; Path path = new Path("location1"); manager.addCleanupLocation(pathEve...
@Override public void scheduleLocations() throws CircusTrainException { try { List<URI> uris = new ArrayList<>(); for (CleanupLocation location : locations) { LOG.info("Scheduling old replica data for deletion for event {}: {}", eventId, location.path.toUri()); housekeepingListener .cleanUpLocation(eventId, location.pa...
HousekeepingCleanupLocationManager implements CleanupLocationManager { @Override public void scheduleLocations() throws CircusTrainException { try { List<URI> uris = new ArrayList<>(); for (CleanupLocation location : locations) { LOG.info("Scheduling old replica data for deletion for event {}: {}", eventId, location.pa...
HousekeepingCleanupLocationManager implements CleanupLocationManager { @Override public void scheduleLocations() throws CircusTrainException { try { List<URI> uris = new ArrayList<>(); for (CleanupLocation location : locations) { LOG.info("Scheduling old replica data for deletion for event {}: {}", eventId, location.pa...
HousekeepingCleanupLocationManager implements CleanupLocationManager { @Override public void scheduleLocations() throws CircusTrainException { try { List<URI> uris = new ArrayList<>(); for (CleanupLocation location : locations) { LOG.info("Scheduling old replica data for deletion for event {}: {}", eventId, location.pa...
HousekeepingCleanupLocationManager implements CleanupLocationManager { @Override public void scheduleLocations() throws CircusTrainException { try { List<URI> uris = new ArrayList<>(); for (CleanupLocation location : locations) { LOG.info("Scheduling old replica data for deletion for event {}: {}", eventId, location.pa...
@Test public void typicalAlterTable() throws Exception { oldTable.setSd(createStorageDescriptor(Arrays.asList(new FieldSchema("colA", "string", "some comment")))); newTable.setSd(createStorageDescriptor(Arrays.asList(new FieldSchema("colA", "string", "some comment")))); service.alterTable(client, oldTable, newTable); v...
public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found columns that have changed ...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
@Test(expected = IllegalStateException.class) public void rethrowException() throws Exception { doThrow(new IllegalStateException()).when(cleanUpPathService).cleanUp(any(Instant.class)); runner.run(null); }
@Override public void run(ApplicationArguments args) { Instant deletionCutoff = new Instant().minus(housekeeping.getExpiredPathDuration()); LOG.info("Housekeeping at instant {} has started", deletionCutoff); CompletionCode completionCode = CompletionCode.SUCCESS; try { housekeepingService.cleanUp(deletionCutoff); LOG.i...
HousekeepingRunner implements ApplicationRunner { @Override public void run(ApplicationArguments args) { Instant deletionCutoff = new Instant().minus(housekeeping.getExpiredPathDuration()); LOG.info("Housekeeping at instant {} has started", deletionCutoff); CompletionCode completionCode = CompletionCode.SUCCESS; try { ...
HousekeepingRunner implements ApplicationRunner { @Override public void run(ApplicationArguments args) { Instant deletionCutoff = new Instant().minus(housekeeping.getExpiredPathDuration()); LOG.info("Housekeeping at instant {} has started", deletionCutoff); CompletionCode completionCode = CompletionCode.SUCCESS; try { ...
HousekeepingRunner implements ApplicationRunner { @Override public void run(ApplicationArguments args) { Instant deletionCutoff = new Instant().minus(housekeeping.getExpiredPathDuration()); LOG.info("Housekeeping at instant {} has started", deletionCutoff); CompletionCode completionCode = CompletionCode.SUCCESS; try { ...
HousekeepingRunner implements ApplicationRunner { @Override public void run(ApplicationArguments args) { Instant deletionCutoff = new Instant().minus(housekeeping.getExpiredPathDuration()); LOG.info("Housekeeping at instant {} has started", deletionCutoff); CompletionCode completionCode = CompletionCode.SUCCESS; try { ...
@Test public void alterTableColumnChange() throws Exception { oldTable.setSd(createStorageDescriptor(Arrays.asList(new FieldSchema("colA", "string", "some comment")))); newTable.setSd(createStorageDescriptor(Arrays.asList(new FieldSchema("colA", "int", "some comment")))); Table tempTable = new Table(newTable); tempTabl...
public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found columns that have changed ...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
@Test public void alterTableCopyPartitionsFails() throws Exception { oldTable.setSd(createStorageDescriptor(Arrays.asList(new FieldSchema("colA", "string", "some comment")))); newTable.setSd(createStorageDescriptor(Arrays.asList(new FieldSchema("colA", "int", "some comment")))); Table tempTable = new Table(newTable); t...
public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found columns that have changed ...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
@Test public void alterTableRenameTableFails() throws Exception { oldTable.setSd(createStorageDescriptor(Arrays.asList(new FieldSchema("colA", "string", "some comment")))); newTable.setSd(createStorageDescriptor(Arrays.asList(new FieldSchema("colA", "int", "some comment")))); Table tempTable = new Table(newTable); temp...
public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found columns that have changed ...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
AlterTableService { public void alterTable(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws Exception { List<FieldSchema> oldColumns = oldTable.getSd().getCols(); List<FieldSchema> newColumns = newTable.getSd().getCols(); if (hasAnyChangedColumns(oldColumns, newColumns)) { LOG .info("Found column...
@Test public void typicalCopyPartitions() throws Exception { List<String> partitionNames = Arrays.asList("part1"); when(client.listPartitionNames(OLD_DB_NAME, OLD_TABLE_NAME, (short) -1)) .thenReturn(partitionNames); when(client.getPartitionsByNames(OLD_DB_NAME, OLD_TABLE_NAME, Arrays.asList("part1"))) .thenReturn(crea...
public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitionBatchSize); while (partit...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
@Test public void singleBatch() throws Exception { List<String> partitionNames = Arrays.asList("part1", "part2"); when(client.listPartitionNames(OLD_DB_NAME, OLD_TABLE_NAME, (short) -1)) .thenReturn(partitionNames); when(client.getPartitionsByNames(OLD_DB_NAME, OLD_TABLE_NAME, Arrays.asList("part1", "part2"))) .thenRet...
public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitionBatchSize); while (partit...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
@Test public void multipleBatches() throws Exception { List<String> partitionNames = Arrays.asList("part1", "part2", "part3"); when(client.listPartitionNames(OLD_DB_NAME, OLD_TABLE_NAME, (short) -1)) .thenReturn(partitionNames); when(client.getPartitionsByNames(OLD_DB_NAME, OLD_TABLE_NAME, Arrays.asList("part1", "part2...
public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitionBatchSize); while (partit...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
@Test public void noPartitions() throws Exception { when(client.listPartitionNames(OLD_DB_NAME, OLD_TABLE_NAME, (short) -1)) .thenReturn(Collections.emptyList()); when(client.getPartitionsByNames(OLD_DB_NAME, OLD_TABLE_NAME, Collections.emptyList())) .thenReturn(Collections.emptyList()); operation.execute(client, oldTa...
public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitionBatchSize); while (partit...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
CopyPartitionsOperation { public void execute(CloseableMetaStoreClient client, Table oldTable, Table newTable) throws TException { int count = 0; String databaseName = newTable.getDbName(); String tableName = newTable.getTableName(); PartitionIterator partitionIterator = new PartitionIterator(client, oldTable, partitio...
@Test public void typicalRenameTable() throws Exception { Table toTableTemp = new Table(toTable); toTableTemp.setTableName(TO_TABLE_NAME_TEMP); operation.execute(client, fromTable, toTable); fromTable.setTableName(TO_TABLE_NAME); verify(client).alter_table(TO_DB_NAME, TO_TABLE_NAME, toTableTemp); verify(client).alter_t...
public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTable = client.getTable(to...
RenameTableOperation { public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTab...
RenameTableOperation { public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTab...
RenameTableOperation { public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTab...
RenameTableOperation { public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTab...
@Test public void renameToTableException() throws Exception { Table toTableTemp = new Table(toTable); toTableTemp.setTableName(TO_TABLE_NAME_TEMP); TException toBeThrown = new TException(); doThrow(toBeThrown).when(client).alter_table(TO_DB_NAME, TO_TABLE_NAME, toTableTemp); try { operation.execute(client, fromTable, t...
public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTable = client.getTable(to...
RenameTableOperation { public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTab...
RenameTableOperation { public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTab...
RenameTableOperation { public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTab...
RenameTableOperation { public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTab...
@Test public void renameFromTableException() throws Exception { Table toTableTemp = new Table(toTable); toTableTemp.setTableName(TO_TABLE_NAME_TEMP); TException toBeThrown = new TException(); doThrow(toBeThrown).when(client).alter_table(FROM_DB_NAME, FROM_TABLE_NAME, fromTable); try { operation.execute(client, fromTabl...
public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTable = client.getTable(to...
RenameTableOperation { public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTab...
RenameTableOperation { public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTab...
RenameTableOperation { public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTab...
RenameTableOperation { public void execute(CloseableMetaStoreClient client, Table from, Table to) throws Exception { LOG .info("Renaming table {}.{} to {}.{}", from.getDbName(), from.getTableName(), to.getDbName(), to.getTableName()); Table fromTable = client.getTable(from.getDbName(), from.getTableName()); Table toTab...
@Test public void getParameterFromTablesTableProperties() { Table table = newTable(); table.getParameters().put(AVRO_SCHEMA_URL_PARAMETER, "test"); assertThat(HiveObjectUtils.getParameter(table, AVRO_SCHEMA_URL_PARAMETER), is("test")); }
public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getParameter(Partition partitio...
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getParameter(Partition partitio...
@Test public void typicalHousekeepingCleanupLocationManager() { ReplicaTable table = new ReplicaTable(); table.setDatabaseName("database"); table.setTableName("table"); TableReplication tableReplication = new TableReplication(); tableReplication.setReplicaTable(table); tableReplication.setReplicationMode(ReplicationMod...
public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphanedDataStrategy() == OrphanedDataS...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
@Test public void notHousekeepingNullCleanupLocationManager() { TableReplication tableReplication = new TableReplication(); tableReplication.setReplicationMode(ReplicationMode.FULL); tableReplication.setOrphanedDataStrategy(OrphanedDataStrategy.NONE); CleanupLocationManager cleanupLocationManager = CleanupLocationManag...
public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphanedDataStrategy() == OrphanedDataS...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
@Test public void metatdataMirrorNullCleanupLocationManager() { TableReplication tableReplication = new TableReplication(); tableReplication.setReplicationMode(ReplicationMode.METADATA_MIRROR); tableReplication.setOrphanedDataStrategy(OrphanedDataStrategy.HOUSEKEEPING); CleanupLocationManager cleanupLocationManager = C...
public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphanedDataStrategy() == OrphanedDataS...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
@Test public void metatdataUpdateNullCleanupLocationManager() { TableReplication tableReplication = new TableReplication(); tableReplication.setReplicationMode(ReplicationMode.METADATA_UPDATE); tableReplication.setOrphanedDataStrategy(OrphanedDataStrategy.HOUSEKEEPING); CleanupLocationManager cleanupLocationManager = C...
public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphanedDataStrategy() == OrphanedDataS...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
CleanupLocationManagerFactory { public static CleanupLocationManager newInstance(String eventId, HousekeepingListener housekeepingListener, ReplicaCatalogListener replicaCatalogListener, TableReplication tableReplication) { if (tableReplication.getReplicationMode() == ReplicationMode.FULL && tableReplication.getOrphane...
@Test public void tableIsUnderCircusTrainControl() throws Exception { when(client.tableExists(DATABASE, REPLICA_TABLE)).thenReturn(true); when(client.getTable(DATABASE, REPLICA_TABLE)).thenReturn(table); assertThat(replica.tableIsUnderCircusTrainControl(), is(true)); verify(client).close(); }
public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getParameters() .get(CircusT...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
@Test public void tableIsUnderCircusTrainControlTableDoesNotExist() throws Exception { when(client.tableExists(DATABASE, REPLICA_TABLE)).thenReturn(false); assertThat(replica.tableIsUnderCircusTrainControl(), is(true)); verify(client).close(); }
public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getParameters() .get(CircusT...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
@Test public void tableIsUnderCircusTrainControlParameterDoesNotMatch() throws Exception { when(client.tableExists(DATABASE, REPLICA_TABLE)).thenReturn(true); table.putToParameters(CircusTrainTableParameter.SOURCE_TABLE.parameterName(), "different.table"); when(client.getTable(DATABASE, REPLICA_TABLE)).thenReturn(table...
public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getParameters() .get(CircusT...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
@Test public void tableIsUnderCircusTrainControlParameterIsNull() throws Exception { when(client.tableExists(DATABASE, REPLICA_TABLE)).thenReturn(true); Map<String, String> parameters = new HashMap<>(); table.setParameters(parameters); when(client.getTable(DATABASE, REPLICA_TABLE)).thenReturn(table); assertThat(replica...
public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getParameters() .get(CircusT...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
DestructiveReplica { public boolean tableIsUnderCircusTrainControl() throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return true; } String sourceTableParameterValue = client .getTable(databaseName, tableName) .getPara...
@Test public void dropDeletedPartitions() throws Exception { when(client.tableExists(DATABASE, REPLICA_TABLE)).thenReturn(true); when(client.getTable(DATABASE, REPLICA_TABLE)).thenReturn(table); Path location1 = new Path("loc1"); Partition replicaPartition1 = newPartition("value1", location1); Path location2 = new Path...
public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Override public boolean a...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
@Test public void dropDeletedPartitionsTableDoesNotExist() throws Exception { when(client.tableExists(DATABASE, REPLICA_TABLE)).thenReturn(false); replica.dropDeletedPartitions(Lists.<String> newArrayList()); verify(client, never()).dropPartition(eq(DATABASE), eq(REPLICA_TABLE), anyString(), anyBoolean()); verify(clean...
public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Override public boolean a...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
@Test public void getParameterFromTablesSerDeProperties() { Table table = newTable(); table.getSd().getSerdeInfo().getParameters().put(AVRO_SCHEMA_URL_PARAMETER, "test"); assertThat(HiveObjectUtils.getParameter(table, AVRO_SCHEMA_URL_PARAMETER), is("test")); }
public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getParameter(Partition partitio...
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getParameter(Partition partitio...
@Test public void dropDeletedPartitionsNothingToDrop() throws Exception { when(client.getTable(DATABASE, REPLICA_TABLE)).thenReturn(table); Partition replicaPartition = new Partition(); replicaPartition.setValues(Lists.newArrayList("value1")); List<Partition> replicaPartitions = Lists.newArrayList(replicaPartition); mo...
public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Override public boolean a...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
@Test public void dropDeletedPartitionsUnpartitionedTable() throws Exception { table.setPartitionKeys(null); when(client.getTable(DATABASE, REPLICA_TABLE)).thenReturn(table); List<String> sourcePartitionNames = Lists.newArrayList(); replica.dropDeletedPartitions(sourcePartitionNames); verify(client, never()).dropPartit...
public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Override public boolean a...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
DestructiveReplica { public void dropDeletedPartitions(final List<String> sourcePartitionNames) throws TException { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, new Predicate<String>() { @Over...
@Test public void dropTablePartitioned() throws Exception { when(client.tableExists(DATABASE, REPLICA_TABLE)).thenReturn(true); when(client.getTable(DATABASE, REPLICA_TABLE)).thenReturn(table); Path location1 = new Path("loc1"); Partition replicaPartition1 = newPartition("value1", location1); Path location2 = new Path(...
public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseName, tableName); log.in...
DestructiveReplica { public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseNam...
DestructiveReplica { public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseNam...
DestructiveReplica { public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseNam...
DestructiveReplica { public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseNam...
@Test public void dropTableButTableDoesNotExist() throws Exception { when(client.tableExists(DATABASE, REPLICA_TABLE)).thenReturn(false); List<Partition> replicaPartitions = Lists.newArrayList(); mockPartitionIterator(replicaPartitions); replica.dropTable(); verify(client, never()).dropPartition(eq(DATABASE), eq(REPLIC...
public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseName, tableName); log.in...
DestructiveReplica { public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseNam...
DestructiveReplica { public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseNam...
DestructiveReplica { public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseNam...
DestructiveReplica { public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseNam...
@Test public void dropTableUnpartitioned() throws Exception { when(client.tableExists(DATABASE, REPLICA_TABLE)).thenReturn(true); table.setPartitionKeys(null); when(client.getTable(DATABASE, REPLICA_TABLE)).thenReturn(table); replica.dropTable(); verify(client).dropTable(DATABASE, REPLICA_TABLE, false, true); verify(cl...
public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseName, tableName); log.in...
DestructiveReplica { public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseNam...
DestructiveReplica { public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseNam...
DestructiveReplica { public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseNam...
DestructiveReplica { public void dropTable() throws TException { try { try (CloseableMetaStoreClient client = replicaMetaStoreClientSupplier.get()) { if (!client.tableExists(databaseName, tableName)) { return; } dropAndDeletePartitions(client, Predicates.<String> alwaysTrue()); Table table = client.getTable(databaseNam...
@Test public void newInstanceReturnsReplicaTableFactory() throws Exception { when(sourceTable.isGeneratePartitionFilter()).thenReturn(false); ReplicaTableFactory factory = picker.newInstance(tableReplication); assertThat(factory, instanceOf(ReplicaTableFactory.class)); assertThat(factory, not(instanceOf(AddCheckSumRepl...
public ReplicaTableFactory newInstance(TableReplication tableReplication) { if (tableReplication.getSourceTable().isGeneratePartitionFilter()) { return new AddCheckSumReplicaTableFactory(sourceHiveConf, checksumFunction, tableTransformation, partitionTransformation, columnStatisticsTransformation); } return new Replica...
ReplicaTableFactoryProvider { public ReplicaTableFactory newInstance(TableReplication tableReplication) { if (tableReplication.getSourceTable().isGeneratePartitionFilter()) { return new AddCheckSumReplicaTableFactory(sourceHiveConf, checksumFunction, tableTransformation, partitionTransformation, columnStatisticsTransfo...
ReplicaTableFactoryProvider { public ReplicaTableFactory newInstance(TableReplication tableReplication) { if (tableReplication.getSourceTable().isGeneratePartitionFilter()) { return new AddCheckSumReplicaTableFactory(sourceHiveConf, checksumFunction, tableTransformation, partitionTransformation, columnStatisticsTransfo...
ReplicaTableFactoryProvider { public ReplicaTableFactory newInstance(TableReplication tableReplication) { if (tableReplication.getSourceTable().isGeneratePartitionFilter()) { return new AddCheckSumReplicaTableFactory(sourceHiveConf, checksumFunction, tableTransformation, partitionTransformation, columnStatisticsTransfo...
ReplicaTableFactoryProvider { public ReplicaTableFactory newInstance(TableReplication tableReplication) { if (tableReplication.getSourceTable().isGeneratePartitionFilter()) { return new AddCheckSumReplicaTableFactory(sourceHiveConf, checksumFunction, tableTransformation, partitionTransformation, columnStatisticsTransfo...
@Test public void newInstanceReturnsAddChecksumReplicaTableFactory() throws Exception { when(sourceTable.isGeneratePartitionFilter()).thenReturn(true); ReplicaTableFactory factory = picker.newInstance(tableReplication); assertThat(factory, instanceOf(AddCheckSumReplicaTableFactory.class)); }
public ReplicaTableFactory newInstance(TableReplication tableReplication) { if (tableReplication.getSourceTable().isGeneratePartitionFilter()) { return new AddCheckSumReplicaTableFactory(sourceHiveConf, checksumFunction, tableTransformation, partitionTransformation, columnStatisticsTransformation); } return new Replica...
ReplicaTableFactoryProvider { public ReplicaTableFactory newInstance(TableReplication tableReplication) { if (tableReplication.getSourceTable().isGeneratePartitionFilter()) { return new AddCheckSumReplicaTableFactory(sourceHiveConf, checksumFunction, tableTransformation, partitionTransformation, columnStatisticsTransfo...
ReplicaTableFactoryProvider { public ReplicaTableFactory newInstance(TableReplication tableReplication) { if (tableReplication.getSourceTable().isGeneratePartitionFilter()) { return new AddCheckSumReplicaTableFactory(sourceHiveConf, checksumFunction, tableTransformation, partitionTransformation, columnStatisticsTransfo...
ReplicaTableFactoryProvider { public ReplicaTableFactory newInstance(TableReplication tableReplication) { if (tableReplication.getSourceTable().isGeneratePartitionFilter()) { return new AddCheckSumReplicaTableFactory(sourceHiveConf, checksumFunction, tableTransformation, partitionTransformation, columnStatisticsTransfo...
ReplicaTableFactoryProvider { public ReplicaTableFactory newInstance(TableReplication tableReplication) { if (tableReplication.getSourceTable().isGeneratePartitionFilter()) { return new AddCheckSumReplicaTableFactory(sourceHiveConf, checksumFunction, tableTransformation, partitionTransformation, columnStatisticsTransfo...
@Test public void newReplicaPartition() throws Exception { Path sourceTableLocationPath = new Path(sourcePartitionFile.toURI().toString()); when(checksumFunction.apply(sourceTableLocationPath)).thenReturn("checksum"); Partition partition = factory.newReplicaPartition("eventId", sourceTable, sourcePartition, "replicaDat...
@Override Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = super.newReplicaPartition(eventId, sourceTable, sourcePartition, replicaDataba...
AddCheckSumReplicaTableFactory extends ReplicaTableFactory { @Override Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = super.newReplicaP...
AddCheckSumReplicaTableFactory extends ReplicaTableFactory { @Override Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = super.newReplicaP...
AddCheckSumReplicaTableFactory extends ReplicaTableFactory { @Override Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = super.newReplicaP...
AddCheckSumReplicaTableFactory extends ReplicaTableFactory { @Override Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = super.newReplicaP...
@Test public void unpartitionedTableLocation() throws Exception { when(sourceLocationManager.getTableLocation()).thenReturn(TABLE_LOCATION); MetadataMirrorReplicaLocationManager replicaLocationManager = new MetadataMirrorReplicaLocationManager( sourceLocationManager, TableType.UNPARTITIONED); assertThat(replicaLocation...
@Override public Path getTableLocation() throws CircusTrainException { return sourceLocationManager.getTableLocation(); }
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() throws CircusTrainException { return sourceLocationManager.getTableLocation(); } }
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() throws CircusTrainException { return sourceLocationManager.getTableLocation(); } MetadataMirrorReplicaLocationManager(SourceLocationManager sourceLocationManager, TableType tableType); }
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() throws CircusTrainException { return sourceLocationManager.getTableLocation(); } MetadataMirrorReplicaLocationManager(SourceLocationManager sourceLocationManager, TableType tableType); @Override Path getTab...
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() throws CircusTrainException { return sourceLocationManager.getTableLocation(); } MetadataMirrorReplicaLocationManager(SourceLocationManager sourceLocationManager, TableType tableType); @Override Path getTab...
@Test(expected = UnsupportedOperationException.class) public void unpartitionedTableLocationThrowsExceptionOnPartitionBaseTableLocation() throws Exception { MetadataMirrorReplicaLocationManager replicaLocationManager = new MetadataMirrorReplicaLocationManager( sourceLocationManager, TableType.UNPARTITIONED); replicaLoc...
@Override public Path getPartitionBaseLocation() throws CircusTrainException { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } return getTableLocation(); }
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() throws CircusTrainException { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } return getTableLocation(); } }
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() throws CircusTrainException { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } return getTableLocation(); } MetadataMirrorReplicaLocationManag...
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() throws CircusTrainException { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } return getTableLocation(); } MetadataMirrorReplicaLocationManag...
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() throws CircusTrainException { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } return getTableLocation(); } MetadataMirrorReplicaLocationManag...
@Test public void getParameterFromTableWhichIsntSetReturnsNull() { Table table = newTable(); assertThat(HiveObjectUtils.getParameter(table, AVRO_SCHEMA_URL_PARAMETER), is(nullValue())); }
public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getParameter(Partition partitio...
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getParameter(Partition partitio...
@Test(expected = UnsupportedOperationException.class) public void unpartitionedTableLocationThrowsExceptionOnPartitionLocation() throws Exception { MetadataMirrorReplicaLocationManager replicaLocationManager = new MetadataMirrorReplicaLocationManager( sourceLocationManager, TableType.UNPARTITIONED); replicaLocationMana...
@Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } if (!LocationUtils.hasLocation(sourcePartition)) { return null; } return new Path(sourcePartition.getSd().getLocation()); }
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } if (!LocationUtils.hasLocation(sourcePartition)) { return null; } retu...
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } if (!LocationUtils.hasLocation(sourcePartition)) { return null; } retu...
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } if (!LocationUtils.hasLocation(sourcePartition)) { return null; } retu...
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } if (!LocationUtils.hasLocation(sourcePartition)) { return null; } retu...
@Test public void unpartitionedTableEmptyLocation() throws Exception { when(sourceLocationManager.getTableLocation()).thenReturn(null); MetadataMirrorReplicaLocationManager replicaLocationManager = new MetadataMirrorReplicaLocationManager( sourceLocationManager, TableType.UNPARTITIONED); assertThat(replicaLocationManag...
@Override public Path getTableLocation() throws CircusTrainException { return sourceLocationManager.getTableLocation(); }
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() throws CircusTrainException { return sourceLocationManager.getTableLocation(); } }
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() throws CircusTrainException { return sourceLocationManager.getTableLocation(); } MetadataMirrorReplicaLocationManager(SourceLocationManager sourceLocationManager, TableType tableType); }
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() throws CircusTrainException { return sourceLocationManager.getTableLocation(); } MetadataMirrorReplicaLocationManager(SourceLocationManager sourceLocationManager, TableType tableType); @Override Path getTab...
MetadataMirrorReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() throws CircusTrainException { return sourceLocationManager.getTableLocation(); } MetadataMirrorReplicaLocationManager(SourceLocationManager sourceLocationManager, TableType tableType); @Override Path getTab...
@Test public void alteringExistingUnpartitionedReplicaViewSucceeds() throws Exception { convertSourceTableToView(); convertExistingReplicaTableToView(); existingReplicaTable.getParameters().put(REPLICATION_EVENT.parameterName(), "previousEventId"); replica.updateMetadata(EVENT_ID, tableAndStatistics, DB_NAME, TABLE_NAM...
public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateTableMetadata(client, eventId, s...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
@Test(expected = CircusTrainException.class) public void tryToReplaceExistingUnpartitionedReplicaTableWithView() throws TException { convertSourceTableToView(); existingReplicaTable.getParameters().put(REPLICATION_EVENT.parameterName(), "previousEventId"); replica.updateMetadata(EVENT_ID, tableAndStatistics, DB_NAME, T...
public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateTableMetadata(client, eventId, s...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
@Test(expected = CircusTrainException.class) public void tryToReplaceExistingUnpartitionedReplicaViewWithTable() throws TException { convertExistingReplicaTableToView(); existingReplicaTable.getParameters().put(REPLICATION_EVENT.parameterName(), "previousEventId"); replica.updateMetadata(EVENT_ID, tableAndStatistics, D...
public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateTableMetadata(client, eventId, s...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
@Test(expected = DestinationNotReplicaException.class) public void validateReplicaTableOnNonReplicicatedTableFails() throws TException { try { replica.validateReplicaTable(DB_NAME, TABLE_NAME); } catch (DestinationNotReplicaException e) { verify(mockMetaStoreClient).getTable(DB_NAME, TABLE_NAME); verify(mockMetaStoreCl...
public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) { LOG.debug("Existing table fou...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
@Test public void validateReplicaTableOnAMirroredTableFails() throws TException, IOException { try { existingReplicaTable.putToParameters(REPLICATION_EVENT.parameterName(), "previousEventId"); existingReplicaTable.putToParameters(REPLICATION_MODE.parameterName(), ReplicationMode.METADATA_MIRROR.name()); replica.validat...
public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) { LOG.debug("Existing table fou...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
@Test public void validateMetadataUpdateReplicaTableOnAMirroredTableFails() throws TException, IOException { try { existingReplicaTable.putToParameters(REPLICATION_EVENT.parameterName(), "previousEventId"); existingReplicaTable.putToParameters(REPLICATION_MODE.parameterName(), ReplicationMode.METADATA_MIRROR.name()); t...
public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) { LOG.debug("Existing table fou...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
@Test public void validateReplicaTableMetadataMirrorOnExistingNoReplicationModeSetTableFails() throws TException, IOException { try { existingReplicaTable.putToParameters(REPLICATION_EVENT.parameterName(), "previousEventId"); tableReplication.setReplicationMode(ReplicationMode.METADATA_MIRROR); replica = newReplica(tab...
public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) { LOG.debug("Existing table fou...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
@Test public void validateReplicaTableMetadataMirrorOnExistingFullReplicationTableFails() throws TException, IOException { try { existingReplicaTable.putToParameters(REPLICATION_EVENT.parameterName(), "previousEventId"); existingReplicaTable.putToParameters(REPLICATION_MODE.parameterName(), ReplicationMode.FULL.name())...
public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) { LOG.debug("Existing table fou...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
@Test public void getParameterFromTablePropertiesWhenSerDePropertiesAreAlsoSetInTable() { Table table = newTable(); table.getParameters().put(AVRO_SCHEMA_URL_PARAMETER, "test"); table.getSd().getSerdeInfo().getParameters().put(AVRO_SCHEMA_URL_PARAMETER, "foo"); assertThat(HiveObjectUtils.getParameter(table, AVRO_SCHEMA...
public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getParameter(Partition partitio...
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getParameter(Partition partitio...
@Test public void getMultipartCopyPartSize() throws Exception { copierOptions.put(S3S3CopierOptions.Keys.MULTIPART_COPY_PART_SIZE.keyName(), 128L); S3S3CopierOptions options = new S3S3CopierOptions(copierOptions); assertThat(options.getMultipartCopyPartSize(), is(128L)); }
public Long getMultipartCopyPartSize() { return MapUtils.getLong(copierOptions, Keys.MULTIPART_COPY_PART_SIZE.keyName(), null); }
S3S3CopierOptions { public Long getMultipartCopyPartSize() { return MapUtils.getLong(copierOptions, Keys.MULTIPART_COPY_PART_SIZE.keyName(), null); } }
S3S3CopierOptions { public Long getMultipartCopyPartSize() { return MapUtils.getLong(copierOptions, Keys.MULTIPART_COPY_PART_SIZE.keyName(), null); } S3S3CopierOptions(); S3S3CopierOptions(Map<String, Object> copierOptions); }
S3S3CopierOptions { public Long getMultipartCopyPartSize() { return MapUtils.getLong(copierOptions, Keys.MULTIPART_COPY_PART_SIZE.keyName(), null); } S3S3CopierOptions(); S3S3CopierOptions(Map<String, Object> copierOptions); void setMaxThreadPoolSize(int maxThreadPoolSize); int getMaxThreadPoolSize(); Long getMultipar...
S3S3CopierOptions { public Long getMultipartCopyPartSize() { return MapUtils.getLong(copierOptions, Keys.MULTIPART_COPY_PART_SIZE.keyName(), null); } S3S3CopierOptions(); S3S3CopierOptions(Map<String, Object> copierOptions); void setMaxThreadPoolSize(int maxThreadPoolSize); int getMaxThreadPoolSize(); Long getMultipar...
@Test public void validateReplicaTableMetadataMirrorOnExistingMetadataUpdateTableFails() throws TException, IOException { try { existingReplicaTable.putToParameters(REPLICATION_EVENT.parameterName(), "previousEventId"); existingReplicaTable.putToParameters(REPLICATION_MODE.parameterName(), ReplicationMode.METADATA_UPDA...
public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) { LOG.debug("Existing table fou...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
@Test public void validateReplicaTableMetadataMirrorOnExistingFullOverwriteReplicationTableFails() throws TException, IOException { try { existingReplicaTable.putToParameters(REPLICATION_EVENT.parameterName(), "previousEventId"); existingReplicaTable.putToParameters(REPLICATION_MODE.parameterName(), FULL_OVERWRITE.name...
public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) { LOG.debug("Existing table fou...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
@Test public void validateFullOverwriteReplicationOnExistingTableSucceeds() throws Exception { existingReplicaTable.putToParameters(REPLICATION_EVENT.parameterName(), "previousEventId"); existingReplicaTable.putToParameters(REPLICATION_MODE.parameterName(), FULL.name()); tableReplication.setReplicationMode(FULL_OVERWRI...
public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableMetaStoreClient client = getMeta...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
@Test public void validateFullOverwriteReplicationWithoutExistingTableIsNotDropped() throws MetaException, Exception { when(mockMetaStoreClient.getTable(DB_NAME, TABLE_NAME)).thenReturn(null); tableReplication.setReplicationMode(FULL_OVERWRITE); replica = newReplica(tableReplication); replica.cleanupReplicaTableIfRequi...
public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableMetaStoreClient client = getMeta...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
@Test public void validateExistingReplicaNotDroppedForFullReplicationType() throws Exception { existingReplicaTable.putToParameters(REPLICATION_EVENT.parameterName(), "previousEventId"); existingReplicaTable.putToParameters(REPLICATION_MODE.parameterName(), FULL.name()); tableReplication.setReplicationMode(FULL); repli...
public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableMetaStoreClient client = getMeta...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
@Test public void validateExistingReplicaNotDroppedForMetadataMirrorReplicationType() throws Exception { existingReplicaTable.putToParameters(REPLICATION_EVENT.parameterName(), "previousEventId"); existingReplicaTable.putToParameters(REPLICATION_MODE.parameterName(), FULL.name()); tableReplication.setReplicationMode(ME...
public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableMetaStoreClient client = getMeta...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
@Test public void validateExistingReplicaNotDroppedForMetadataUpdateReplicationType() throws Exception { existingReplicaTable.putToParameters(REPLICATION_EVENT.parameterName(), "previousEventId"); existingReplicaTable.putToParameters(REPLICATION_MODE.parameterName(), FULL.name()); tableReplication.setReplicationMode(ME...
public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableMetaStoreClient client = getMeta...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
Replica extends HiveEndpoint { public void cleanupReplicaTableIfRequired( String replicaDatabaseName, String replicaTableName, DataManipulator dataManipulator) throws Exception { if (replicationMode == FULL_OVERWRITE) { LOG.debug("Replication mode: FULL_OVERWRITE. Checking for existing replica table."); try (CloseableM...
@Test public void alteringExistingPartitionedReplicaViewSucceeds() throws Exception, IOException { convertSourceTableToView(); convertExistingReplicaTableToView(); when(mockMetaStoreClient .getPartitionsByNames(DB_NAME, TABLE_NAME, Lists.newArrayList("c=one/d=two", "c=three/d=four"))) .thenReturn(Arrays.asList(existing...
public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateTableMetadata(client, eventId, s...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
@Test(expected = CircusTrainException.class) public void tryToReplaceExistingPartitionedReplicaViewWithTable() throws TException, IOException { convertExistingReplicaTableToView(); existingReplicaTable.getParameters().put(REPLICATION_EVENT.parameterName(), "previousEventId"); replica .updateMetadata(EVENT_ID, tableAndS...
public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateTableMetadata(client, eventId, s...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
@Test(expected = CircusTrainException.class) public void tryToReplaceExistingPartitionedReplicaTableWithView() throws TException, IOException { convertSourceTableToView(); existingReplicaTable.getParameters().put(REPLICATION_EVENT.parameterName(), "previousEventId"); replica .updateMetadata(EVENT_ID, tableAndStatistics...
public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateTableMetadata(client, eventId, s...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
Replica extends HiveEndpoint { public void updateMetadata( String eventId, TableAndStatistics sourceTable, String replicaDatabaseName, String replicaTableName, ReplicaLocationManager locationManager) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = updateT...
@Test public void updateUrlInTable() { Table table = newTable(); table.getParameters().put(AVRO_SCHEMA_URL_PARAMETER, "test"); table.getSd().getSerdeInfo().getParameters().put(AVRO_SCHEMA_URL_PARAMETER, "test"); HiveObjectUtils.updateSerDeUrl(table, AVRO_SCHEMA_URL_PARAMETER, "updatedUrl"); assertThat(table.getParamete...
public static Table updateSerDeUrl(Table table, String parameter, String url) { updateSerDeUrl(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter, url); return table; }
HiveObjectUtils { public static Table updateSerDeUrl(Table table, String parameter, String url) { updateSerDeUrl(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter, url); return table; } }
HiveObjectUtils { public static Table updateSerDeUrl(Table table, String parameter, String url) { updateSerDeUrl(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter, url); return table; } private HiveObjectUtils(); }
HiveObjectUtils { public static Table updateSerDeUrl(Table table, String parameter, String url) { updateSerDeUrl(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter, url); return table; } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getP...
HiveObjectUtils { public static Table updateSerDeUrl(Table table, String parameter, String url) { updateSerDeUrl(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter, url); return table; } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getP...
@Test(expected = DestinationNotReplicaException.class) public void validateReplicaTableExistingNonReplicaPartitionedTableFails() throws TException, IOException { try { replica.validateReplicaTable(DB_NAME, TABLE_NAME); } catch (DestinationNotReplicaException e) { verify(mockMetaStoreClient).getTable(DB_NAME, TABLE_NAME...
public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) { LOG.debug("Existing table fou...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
Replica extends HiveEndpoint { public void validateReplicaTable(String replicaDatabaseName, String replicaTableName) { try (CloseableMetaStoreClient client = getMetaStoreClientSupplier().get()) { Optional<Table> oldReplicaTable = getTable(client, replicaDatabaseName, replicaTableName); if (oldReplicaTable.isPresent()) ...
@Test public void newTable() { TableAndStatistics replicaAndStats = factory.newReplicaTable(EVENT_ID, sourceTableAndStats, DB_NAME, TABLE_NAME, REPLICA_DATA_DESTINATION, FULL); Table replica = replicaAndStats.getTable(); assertThat(replica.getDbName(), is(sourceTable.getDbName())); assertThat(replica.getTableName(), is...
TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransformation.transform(new...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
@Test public void newTableWithTransformation() { ReplicaTableFactory factory = new ReplicaTableFactory(SOURCE_META_STORE_URIS, TABLE_TRANSFORMATION, PartitionTransformation.IDENTITY, ColumnStatisticsTransformation.IDENTITY); TableAndStatistics replicaAndStats = factory.newReplicaTable(EVENT_ID, sourceTableAndStats, DB_...
TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransformation.transform(new...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
@Test public void newTableEncodedLocation() { TableAndStatistics replicaAndStats = factory.newReplicaTable(EVENT_ID, sourceTableAndStats, DB_NAME, TABLE_NAME, new Path(REPLICA_DATA_DESTINATION, "%25"), FULL); Table replica = replicaAndStats.getTable(); assertThat(replica.getSd().getLocation(), is("hdfs: }
TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransformation.transform(new...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
@Test public void newPartition() { Path replicaPartitionPath = new Path(REPLICA_DATA_DESTINATION, REPLICA_PARTITION_SUBPATH); Partition replica = factory.newReplicaPartition(EVENT_ID, sourceTable, sourcePartition, DB_NAME, TABLE_NAME, replicaPartitionPath, FULL); assertThat(replica.getDbName(), is(sourceTable.getDbName...
Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition)); replica.setDbName(rep...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
@Test public void newPartitionWithTransformation() { ReplicaTableFactory factory = new ReplicaTableFactory(SOURCE_META_STORE_URIS, TableTransformation.IDENTITY, PARTITION_TRANSFORMATION, ColumnStatisticsTransformation.IDENTITY); Path replicaPartitionPath = new Path(REPLICA_DATA_DESTINATION, REPLICA_PARTITION_SUBPATH); ...
Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition)); replica.setDbName(rep...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
@Test public void newPartitionEncodedLocation() { Path replicaPartitionPath = new Path(REPLICA_DATA_DESTINATION, REPLICA_PARTITION_SUBPATH + "%25"); Partition replica = factory.newReplicaPartition(EVENT_ID, sourceTable, sourcePartition, DB_NAME, TABLE_NAME, replicaPartitionPath, FULL); assertThat(replica.getSd().getLoc...
Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition)); replica.setDbName(rep...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
@Test public void newTableWithNameMappings() { TableAndStatistics replicaAndStats = factory.newReplicaTable(EVENT_ID, sourceTableAndStats, MAPPED_DB_NAME, MAPPED_TABLE_NAME, REPLICA_DATA_DESTINATION, FULL); Table replica = replicaAndStats.getTable(); assertThat(replica.getDbName(), is(MAPPED_DB_NAME)); assertThat(repli...
TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransformation.transform(new...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
@Test public void newPartitionNameMappings() { Path replicaPartitionPath = new Path(REPLICA_DATA_DESTINATION, REPLICA_PARTITION_SUBPATH); Partition replica = factory.newReplicaPartition(EVENT_ID, sourceTable, sourcePartition, MAPPED_DB_NAME, MAPPED_TABLE_NAME, replicaPartitionPath, FULL); assertThat(replica.getDbName()...
Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition)); replica.setDbName(rep...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
@Test public void newTableWithNameMappingsAndStats() { ColumnStatisticsObj columnStatisticsObj1 = new ColumnStatisticsObj(); ColumnStatisticsObj columnStatisticsObj2 = new ColumnStatisticsObj(); List<ColumnStatisticsObj> columnStatisticsObjs = Arrays.asList(columnStatisticsObj1, columnStatisticsObj2); TableAndStatistic...
TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransformation.transform(new...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
@Test public void getParameterFromPartitionsTableProperties() { Partition partition = newPartition(); partition.getParameters().put(AVRO_SCHEMA_URL_PARAMETER, "test"); assertThat(HiveObjectUtils.getParameter(partition, AVRO_SCHEMA_URL_PARAMETER), is("test")); }
public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getParameter(Partition partitio...
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getParameter(Partition partitio...
@Test public void newReplicaPartitionStatistics() throws MetaException { sourceTable.setPartitionKeys( Arrays.asList(new FieldSchema("one", "string", null), new FieldSchema("two", "string", null))); Partition replicaPartition = new Partition(sourcePartition); replicaPartition.setDbName(MAPPED_DB_NAME); replicaPartition...
ColumnStatistics newReplicaPartitionStatistics( Table replicaTable, Partition replicaPartition, ColumnStatistics sourcePartitionStatistics) { ColumnStatisticsDesc statisticsDesc = new ColumnStatisticsDesc(false, replicaPartition.getDbName(), replicaPartition.getTableName()); try { statisticsDesc.setPartName(Warehouse.m...
ReplicaTableFactory { ColumnStatistics newReplicaPartitionStatistics( Table replicaTable, Partition replicaPartition, ColumnStatistics sourcePartitionStatistics) { ColumnStatisticsDesc statisticsDesc = new ColumnStatisticsDesc(false, replicaPartition.getDbName(), replicaPartition.getTableName()); try { statisticsDesc.s...
ReplicaTableFactory { ColumnStatistics newReplicaPartitionStatistics( Table replicaTable, Partition replicaPartition, ColumnStatistics sourcePartitionStatistics) { ColumnStatisticsDesc statisticsDesc = new ColumnStatisticsDesc(false, replicaPartition.getDbName(), replicaPartition.getTableName()); try { statisticsDesc.s...
ReplicaTableFactory { ColumnStatistics newReplicaPartitionStatistics( Table replicaTable, Partition replicaPartition, ColumnStatistics sourcePartitionStatistics) { ColumnStatisticsDesc statisticsDesc = new ColumnStatisticsDesc(false, replicaPartition.getDbName(), replicaPartition.getTableName()); try { statisticsDesc.s...
ReplicaTableFactory { ColumnStatistics newReplicaPartitionStatistics( Table replicaTable, Partition replicaPartition, ColumnStatistics sourcePartitionStatistics) { ColumnStatisticsDesc statisticsDesc = new ColumnStatisticsDesc(false, replicaPartition.getDbName(), replicaPartition.getTableName()); try { statisticsDesc.s...
@Test public void newReplicaPartitionStatisticsWithTransformation() throws MetaException { sourceTable.setPartitionKeys( Arrays.asList(new FieldSchema("one", "string", null), new FieldSchema("two", "string", null))); Partition replicaPartition = new Partition(sourcePartition); replicaPartition.setDbName(MAPPED_DB_NAME)...
ColumnStatistics newReplicaPartitionStatistics( Table replicaTable, Partition replicaPartition, ColumnStatistics sourcePartitionStatistics) { ColumnStatisticsDesc statisticsDesc = new ColumnStatisticsDesc(false, replicaPartition.getDbName(), replicaPartition.getTableName()); try { statisticsDesc.setPartName(Warehouse.m...
ReplicaTableFactory { ColumnStatistics newReplicaPartitionStatistics( Table replicaTable, Partition replicaPartition, ColumnStatistics sourcePartitionStatistics) { ColumnStatisticsDesc statisticsDesc = new ColumnStatisticsDesc(false, replicaPartition.getDbName(), replicaPartition.getTableName()); try { statisticsDesc.s...
ReplicaTableFactory { ColumnStatistics newReplicaPartitionStatistics( Table replicaTable, Partition replicaPartition, ColumnStatistics sourcePartitionStatistics) { ColumnStatisticsDesc statisticsDesc = new ColumnStatisticsDesc(false, replicaPartition.getDbName(), replicaPartition.getTableName()); try { statisticsDesc.s...
ReplicaTableFactory { ColumnStatistics newReplicaPartitionStatistics( Table replicaTable, Partition replicaPartition, ColumnStatistics sourcePartitionStatistics) { ColumnStatisticsDesc statisticsDesc = new ColumnStatisticsDesc(false, replicaPartition.getDbName(), replicaPartition.getTableName()); try { statisticsDesc.s...
ReplicaTableFactory { ColumnStatistics newReplicaPartitionStatistics( Table replicaTable, Partition replicaPartition, ColumnStatistics sourcePartitionStatistics) { ColumnStatisticsDesc statisticsDesc = new ColumnStatisticsDesc(false, replicaPartition.getDbName(), replicaPartition.getTableName()); try { statisticsDesc.s...
@Test public void newView() { sourceTableAndStats.getTable().setTableType(TableType.VIRTUAL_VIEW.name()); sourceTableAndStats.getTable().getSd().setInputFormat(null); sourceTableAndStats.getTable().getSd().setOutputFormat(null); sourceTableAndStats.getTable().getSd().setLocation(null); TableAndStatistics replicaAndStat...
TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransformation.transform(new...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
ReplicaTableFactory { TableAndStatistics newReplicaTable( String eventId, TableAndStatistics sourceTableAndStatistics, String replicaDatabaseName, String replicaTableName, Path replicaDataDestination, ReplicationMode replicationMode) { Table sourceTable = sourceTableAndStatistics.getTable(); Table replica = tableTransf...
@Test public void newViewPartition() { sourceTable.setTableType(TableType.VIRTUAL_VIEW.name()); sourceTable.getSd().setInputFormat(null); sourceTable.getSd().setOutputFormat(null); sourceTable.getSd().setLocation(null); sourcePartition.getSd().setInputFormat(null); sourcePartition.getSd().setOutputFormat(null); sourceP...
Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition)); replica.setDbName(rep...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
ReplicaTableFactory { Partition newReplicaPartition( String eventId, Table sourceTable, Partition sourcePartition, String replicaDatabaseName, String replicaTableName, Path replicaPartitionLocation, ReplicationMode replicationMode) { Partition replica = partitionTransformation.transform(new Partition(sourcePartition));...
@Test public void getTableOnUnpartitionedTable() throws Exception { FullReplicationReplicaLocationManager manager = new FullReplicationReplicaLocationManager(sourceLocationManager, TABLE_PATH, EVENT_ID, UNPARTITIONED, cleanupLocationManager, replicaCatalogListener); Path path = manager.getTableLocation(); assertThat(pa...
@Override public Path getTableLocation() { Path replicaDataLocation = new Path(tablePath); if (tableType == UNPARTITIONED) { replicaDataLocation = new Path(replicaDataLocation, eventId); } LOG.debug("Generated table data destination path: {}", replicaDataLocation.toUri()); replicaCatalogListener.resolvedReplicaLocation...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() { Path replicaDataLocation = new Path(tablePath); if (tableType == UNPARTITIONED) { replicaDataLocation = new Path(replicaDataLocation, eventId); } LOG.debug("Generated table data destination path: {}", re...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() { Path replicaDataLocation = new Path(tablePath); if (tableType == UNPARTITIONED) { replicaDataLocation = new Path(replicaDataLocation, eventId); } LOG.debug("Generated table data destination path: {}", re...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() { Path replicaDataLocation = new Path(tablePath); if (tableType == UNPARTITIONED) { replicaDataLocation = new Path(replicaDataLocation, eventId); } LOG.debug("Generated table data destination path: {}", re...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() { Path replicaDataLocation = new Path(tablePath); if (tableType == UNPARTITIONED) { replicaDataLocation = new Path(replicaDataLocation, eventId); } LOG.debug("Generated table data destination path: {}", re...
@Test(expected = UnsupportedOperationException.class) public void getPartitionBaseOnUnpartitionedTable() throws Exception { FullReplicationReplicaLocationManager manager = new FullReplicationReplicaLocationManager(sourceLocationManager, TABLE_PATH, EVENT_ID, UNPARTITIONED, cleanupLocationManager, replicaCatalogListener...
@Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionBasePath = new Path(getTableLocation(), eventId); LOG.debug("Generated partition data destination base path: {}", partitionBasePath.toUri()); return p...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionBasePath = new Path(getTableLocation(), eventId); LOG.debug("Generated parti...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionBasePath = new Path(getTableLocation(), eventId); LOG.debug("Generated parti...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionBasePath = new Path(getTableLocation(), eventId); LOG.debug("Generated parti...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionBasePath = new Path(getTableLocation(), eventId); LOG.debug("Generated parti...
@Test(expected = UnsupportedOperationException.class) public void getPartitionLocationOnUnpartitionedTable() throws Exception { FullReplicationReplicaLocationManager manager = new FullReplicationReplicaLocationManager(sourceLocationManager, TABLE_PATH, EVENT_ID, UNPARTITIONED, cleanupLocationManager, replicaCatalogList...
@Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionSubPath = sourceLocationManager.getPartitionSubPath(locationAsPath(sourcePartition)); Path replicaPartitionLocation = new Path(ge...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionSubPath = sourceLocationManager.getPartitionSubPath(loc...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionSubPath = sourceLocationManager.getPartitionSubPath(loc...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionSubPath = sourceLocationManager.getPartitionSubPath(loc...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionSubPath = sourceLocationManager.getPartitionSubPath(loc...
@Test public void getPartitionLocationOnPartitionedTable() throws Exception { FullReplicationReplicaLocationManager manager = new FullReplicationReplicaLocationManager(sourceLocationManager, TABLE_PATH, EVENT_ID, PARTITIONED, cleanupLocationManager, replicaCatalogListener); when(sourcePartition.getSd()).thenReturn(sd);...
@Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionSubPath = sourceLocationManager.getPartitionSubPath(locationAsPath(sourcePartition)); Path replicaPartitionLocation = new Path(ge...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionSubPath = sourceLocationManager.getPartitionSubPath(loc...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionSubPath = sourceLocationManager.getPartitionSubPath(loc...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionSubPath = sourceLocationManager.getPartitionSubPath(loc...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionSubPath = sourceLocationManager.getPartitionSubPath(loc...
@Test public void getTableOnPartitionedTable() throws Exception { FullReplicationReplicaLocationManager manager = new FullReplicationReplicaLocationManager(sourceLocationManager, TABLE_PATH, EVENT_ID, PARTITIONED, cleanupLocationManager, replicaCatalogListener); Path path = manager.getTableLocation(); assertThat(path, ...
@Override public Path getTableLocation() { Path replicaDataLocation = new Path(tablePath); if (tableType == UNPARTITIONED) { replicaDataLocation = new Path(replicaDataLocation, eventId); } LOG.debug("Generated table data destination path: {}", replicaDataLocation.toUri()); replicaCatalogListener.resolvedReplicaLocation...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() { Path replicaDataLocation = new Path(tablePath); if (tableType == UNPARTITIONED) { replicaDataLocation = new Path(replicaDataLocation, eventId); } LOG.debug("Generated table data destination path: {}", re...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() { Path replicaDataLocation = new Path(tablePath); if (tableType == UNPARTITIONED) { replicaDataLocation = new Path(replicaDataLocation, eventId); } LOG.debug("Generated table data destination path: {}", re...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() { Path replicaDataLocation = new Path(tablePath); if (tableType == UNPARTITIONED) { replicaDataLocation = new Path(replicaDataLocation, eventId); } LOG.debug("Generated table data destination path: {}", re...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() { Path replicaDataLocation = new Path(tablePath); if (tableType == UNPARTITIONED) { replicaDataLocation = new Path(replicaDataLocation, eventId); } LOG.debug("Generated table data destination path: {}", re...
@Test public void getPartitionBaseOnPartitionedTable() throws Exception { FullReplicationReplicaLocationManager manager = new FullReplicationReplicaLocationManager(sourceLocationManager, TABLE_PATH, EVENT_ID, PARTITIONED, cleanupLocationManager, replicaCatalogListener); Path path = manager.getPartitionBaseLocation(); a...
@Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionBasePath = new Path(getTableLocation(), eventId); LOG.debug("Generated partition data destination base path: {}", partitionBasePath.toUri()); return p...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionBasePath = new Path(getTableLocation(), eventId); LOG.debug("Generated parti...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionBasePath = new Path(getTableLocation(), eventId); LOG.debug("Generated parti...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionBasePath = new Path(getTableLocation(), eventId); LOG.debug("Generated parti...
FullReplicationReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } Path partitionBasePath = new Path(getTableLocation(), eventId); LOG.debug("Generated parti...
@Test public void getParameterFromPartitionsSerDeProperties() { Partition partition = newPartition(); partition.getSd().getSerdeInfo().getParameters().put(AVRO_SCHEMA_URL_PARAMETER, "test"); assertThat(HiveObjectUtils.getParameter(partition, AVRO_SCHEMA_URL_PARAMETER), is("test")); }
public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); }
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getParameter(Partition partitio...
HiveObjectUtils { public static String getParameter(Table table, String parameter) { return getParameter(table.getParameters(), table.getSd().getSerdeInfo().getParameters(), parameter); } private HiveObjectUtils(); static String getParameter(Table table, String parameter); static String getParameter(Partition partitio...
@Test public void unpartitionedTableLocation() throws Exception { MetadataUpdateReplicaLocationManager replicaLocationManager = new MetadataUpdateReplicaLocationManager(client, TableType.UNPARTITIONED, tableLocation, DATABASE, TABLE); assertThat(replicaLocationManager.getTableLocation(), is(tableLocationPath)); }
@Override public Path getTableLocation() { return new Path(tablePath); }
MetadataUpdateReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() { return new Path(tablePath); } }
MetadataUpdateReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() { return new Path(tablePath); } MetadataUpdateReplicaLocationManager( CloseableMetaStoreClient replicaMetastoreClient, TableType tableType, String tablePath, String replicaDatabaseNa...
MetadataUpdateReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() { return new Path(tablePath); } MetadataUpdateReplicaLocationManager( CloseableMetaStoreClient replicaMetastoreClient, TableType tableType, String tablePath, String replicaDatabaseNa...
MetadataUpdateReplicaLocationManager implements ReplicaLocationManager { @Override public Path getTableLocation() { return new Path(tablePath); } MetadataUpdateReplicaLocationManager( CloseableMetaStoreClient replicaMetastoreClient, TableType tableType, String tablePath, String replicaDatabaseNa...
@Test(expected = UnsupportedOperationException.class) public void unpartitionedTableLocationThrowsExceptionOnPartitionBaseTableLocation() throws Exception { MetadataUpdateReplicaLocationManager replicaLocationManager = new MetadataUpdateReplicaLocationManager(client, TableType.UNPARTITIONED, tableLocation, DATABASE, TA...
@Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } return getTableLocation(); }
MetadataUpdateReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } return getTableLocation(); } }
MetadataUpdateReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } return getTableLocation(); } MetadataUpdateReplicaLocationManager( CloseableMetaStore...
MetadataUpdateReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } return getTableLocation(); } MetadataUpdateReplicaLocationManager( CloseableMetaStore...
MetadataUpdateReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionBaseLocation() { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } return getTableLocation(); } MetadataUpdateReplicaLocationManager( CloseableMetaStore...
@Test(expected = UnsupportedOperationException.class) public void unpartitionedTableLocationThrowsExceptionOnPartitionLocation() throws Exception { MetadataUpdateReplicaLocationManager replicaLocationManager = new MetadataUpdateReplicaLocationManager(client, TableType.UNPARTITIONED, tableLocation, DATABASE, TABLE); rep...
@Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } try { Partition partition = replicaMetastoreClient.getPartition(replicaDatabaseName, replicaTableName, sourcePartition.getValues()); return new...
MetadataUpdateReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } try { Partition partition = replicaMetastoreClient.getPartition(replic...
MetadataUpdateReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } try { Partition partition = replicaMetastoreClient.getPartition(replic...
MetadataUpdateReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } try { Partition partition = replicaMetastoreClient.getPartition(replic...
MetadataUpdateReplicaLocationManager implements ReplicaLocationManager { @Override public Path getPartitionLocation(Partition sourcePartition) { if (tableType == UNPARTITIONED) { throw new UnsupportedOperationException("Not a partitioned table."); } try { Partition partition = replicaMetastoreClient.getPartition(replic...
@Test public void defaultReplicaTableFactory() throws Exception { Replica replica = replicaFactory.newInstance(tableReplication); assertNotNull(replica); verify(replicaTableFactoryPicker).newInstance(tableReplication); }
@Override public Replica newInstance(TableReplication tableReplication) { ReplicaTableFactory replicaTableFactory = replicaTableFactoryPicker.newInstance(tableReplication); DropTableService dropTableService = new DropTableService(); AlterTableService alterTableService = new AlterTableService(dropTableService, new CopyP...
ReplicaFactory implements HiveEndpointFactory<Replica> { @Override public Replica newInstance(TableReplication tableReplication) { ReplicaTableFactory replicaTableFactory = replicaTableFactoryPicker.newInstance(tableReplication); DropTableService dropTableService = new DropTableService(); AlterTableService alterTableSe...
ReplicaFactory implements HiveEndpointFactory<Replica> { @Override public Replica newInstance(TableReplication tableReplication) { ReplicaTableFactory replicaTableFactory = replicaTableFactoryPicker.newInstance(tableReplication); DropTableService dropTableService = new DropTableService(); AlterTableService alterTableSe...
ReplicaFactory implements HiveEndpointFactory<Replica> { @Override public Replica newInstance(TableReplication tableReplication) { ReplicaTableFactory replicaTableFactory = replicaTableFactoryPicker.newInstance(tableReplication); DropTableService dropTableService = new DropTableService(); AlterTableService alterTableSe...
ReplicaFactory implements HiveEndpointFactory<Replica> { @Override public Replica newInstance(TableReplication tableReplication) { ReplicaTableFactory replicaTableFactory = replicaTableFactoryPicker.newInstance(tableReplication); DropTableService dropTableService = new DropTableService(); AlterTableService alterTableSe...
@Test public void newInstanceFullReplicationMode() throws Exception { when(tableReplication.getReplicationMode()).thenReturn(ReplicationMode.FULL); when(sourceCatalog.isDisableSnapshots()).thenReturn(false); SourceFactory sourceFactory = new SourceFactory(sourceCatalog, sourceHiveConf, sourceMetaStoreClientSupplier, so...
@Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog, sourceHiveConf, sourceMetaStoreClientSupplier, source...
SourceFactory implements HiveEndpointFactory<Source> { @Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog...
SourceFactory implements HiveEndpointFactory<Source> { @Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog...
SourceFactory implements HiveEndpointFactory<Source> { @Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog...
SourceFactory implements HiveEndpointFactory<Source> { @Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog...
@Test public void newInstanceMetadataMirrorReplicationModeOverridesDisabledSnapshots() throws Exception { when(tableReplication.getReplicationMode()).thenReturn(ReplicationMode.METADATA_MIRROR); when(sourceCatalog.isDisableSnapshots()).thenReturn(false); SourceFactory sourceFactory = new SourceFactory(sourceCatalog, so...
@Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog, sourceHiveConf, sourceMetaStoreClientSupplier, source...
SourceFactory implements HiveEndpointFactory<Source> { @Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog...
SourceFactory implements HiveEndpointFactory<Source> { @Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog...
SourceFactory implements HiveEndpointFactory<Source> { @Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog...
SourceFactory implements HiveEndpointFactory<Source> { @Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog...
@Test public void newInstanceMetadataUpdateReplicationModeOverridesDisabledSnapshots() throws Exception { when(tableReplication.getReplicationMode()).thenReturn(ReplicationMode.METADATA_UPDATE); when(sourceCatalog.isDisableSnapshots()).thenReturn(false); SourceFactory sourceFactory = new SourceFactory(sourceCatalog, so...
@Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog, sourceHiveConf, sourceMetaStoreClientSupplier, source...
SourceFactory implements HiveEndpointFactory<Source> { @Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog...
SourceFactory implements HiveEndpointFactory<Source> { @Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog...
SourceFactory implements HiveEndpointFactory<Source> { @Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog...
SourceFactory implements HiveEndpointFactory<Source> { @Override public Source newInstance(TableReplication tableReplication) { boolean snapshotsDisabled = true; if (tableReplication.getReplicationMode() == ReplicationMode.FULL) { snapshotsDisabled = sourceCatalog.isDisableSnapshots(); } return new Source(sourceCatalog...
@Test public void nullTableLocation() { assertThat(locationManager.getTableLocation(), is(nullValue())); }
@Override public Path getTableLocation() { return null; }
ViewLocationManager implements SourceLocationManager { @Override public Path getTableLocation() { return null; } }
ViewLocationManager implements SourceLocationManager { @Override public Path getTableLocation() { return null; } }
ViewLocationManager implements SourceLocationManager { @Override public Path getTableLocation() { return null; } @Override Path getTableLocation(); @Override void cleanUpLocations(); @Override List<Path> getPartitionLocations(); @Override Path getPartitionSubPath(Path partitionLocation); }
ViewLocationManager implements SourceLocationManager { @Override public Path getTableLocation() { return null; } @Override Path getTableLocation(); @Override void cleanUpLocations(); @Override List<Path> getPartitionLocations(); @Override Path getPartitionSubPath(Path partitionLocation); }
@Test public void emptyPartitionLocations() { assertThat(locationManager.getPartitionLocations(), is(not(nullValue()))); }
@Override public List<Path> getPartitionLocations() { return Collections.emptyList(); }
ViewLocationManager implements SourceLocationManager { @Override public List<Path> getPartitionLocations() { return Collections.emptyList(); } }
ViewLocationManager implements SourceLocationManager { @Override public List<Path> getPartitionLocations() { return Collections.emptyList(); } }
ViewLocationManager implements SourceLocationManager { @Override public List<Path> getPartitionLocations() { return Collections.emptyList(); } @Override Path getTableLocation(); @Override void cleanUpLocations(); @Override List<Path> getPartitionLocations(); @Override Path getPartitionSubPath(Path partitionLocation); ...
ViewLocationManager implements SourceLocationManager { @Override public List<Path> getPartitionLocations() { return Collections.emptyList(); } @Override Path getTableLocation(); @Override void cleanUpLocations(); @Override List<Path> getPartitionLocations(); @Override Path getPartitionSubPath(Path partitionLocation); ...