@Override public HCatEventMessage checkValid() { if (getTable() == null) throw new IllegalStateException("Table name unset."); return super.checkValid(); } }
@Override public Iterable<? extends Command> getSrcWhCommands() { verifyActionable(); final String dbName = insertMessage.getDB(); final String tableName = insertMessage.getTable(); final Map<String,String> ptnDesc = insertMessage.getPartitionKeyValues(); // Note : ptnDesc can be null or empty for non-ptn table return Collections.singletonList(new ExportCommand( dbName, tableName, ptnDesc, srcStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), dbName, tableName, ptnDesc) ), false, event.getEventId() )); }
public Iterable<? extends Command> getDstWhCommands() { verifyActionable(); final String dbName = insertMessage.getDB(); final String tableName = insertMessage.getTable(); final Map<String,String> ptnDesc = insertMessage.getPartitionKeyValues(); // Note : ptnDesc can be null or empty for non-ptn table return Collections.singletonList(new ImportCommand( ReplicationUtils.mapIfMapAvailable(dbName, dbNameMapping), ReplicationUtils.mapIfMapAvailable(tableName, tableNameMapping), ptnDesc, dstStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), dbName, // Note - important to retain the same key as the export tableName, ptnDesc) ), false, event.getEventId() )); }
@Override public HCatEventMessage checkValid() { if (getTable() == null) throw new IllegalStateException("Table name unset."); return super.checkValid(); } }
@Override public HCatEventMessage checkValid() { if (getTable() == null) throw new IllegalStateException("Table name unset."); return super.checkValid(); } }
@Override public HCatEventMessage checkValid() { if (getTable() == null) throw new IllegalStateException("Table name unset."); return super.checkValid(); } }
@Override public Iterable<? extends Command> getSrcWhCommands() { verifyActionable(); final String dbName = insertMessage.getDB(); final String tableName = insertMessage.getTable(); final Map<String,String> ptnDesc = insertMessage.getPartitionKeyValues(); // Note : ptnDesc can be null or empty for non-ptn table return Collections.singletonList(new ExportCommand( dbName, tableName, ptnDesc, srcStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), dbName, tableName, ptnDesc) ), false, event.getEventId() )); }
@Override public Iterable<? extends Command> getSrcWhCommands() { verifyActionable(); final String dbName = insertMessage.getDB(); final String tableName = insertMessage.getTable(); final Map<String,String> ptnDesc = insertMessage.getPartitionKeyValues(); // Note : ptnDesc can be null or empty for non-ptn table return Collections.singletonList(new ExportCommand( dbName, tableName, ptnDesc, srcStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), dbName, tableName, ptnDesc) ), false, event.getEventId() )); }
@Override public Iterable<? extends Command> getSrcWhCommands() { verifyActionable(); final String dbName = insertMessage.getDB(); final String tableName = insertMessage.getTable(); final Map<String,String> ptnDesc = insertMessage.getPartitionKeyValues(); // Note : ptnDesc can be null or empty for non-ptn table return Collections.singletonList(new ExportCommand( dbName, tableName, ptnDesc, srcStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), dbName, tableName, ptnDesc) ), false, event.getEventId() )); }
public Iterable<? extends Command> getDstWhCommands() { verifyActionable(); final String dbName = insertMessage.getDB(); final String tableName = insertMessage.getTable(); final Map<String,String> ptnDesc = insertMessage.getPartitionKeyValues(); // Note : ptnDesc can be null or empty for non-ptn table return Collections.singletonList(new ImportCommand( ReplicationUtils.mapIfMapAvailable(dbName, dbNameMapping), ReplicationUtils.mapIfMapAvailable(tableName, tableNameMapping), ptnDesc, dstStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), dbName, // Note - important to retain the same key as the export tableName, ptnDesc) ), false, event.getEventId() )); }
public Iterable<? extends Command> getDstWhCommands() { verifyActionable(); final String dbName = insertMessage.getDB(); final String tableName = insertMessage.getTable(); final Map<String,String> ptnDesc = insertMessage.getPartitionKeyValues(); // Note : ptnDesc can be null or empty for non-ptn table return Collections.singletonList(new ImportCommand( ReplicationUtils.mapIfMapAvailable(dbName, dbNameMapping), ReplicationUtils.mapIfMapAvailable(tableName, tableNameMapping), ptnDesc, dstStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), dbName, // Note - important to retain the same key as the export tableName, ptnDesc) ), false, event.getEventId() )); }
public Iterable<? extends Command> getDstWhCommands() { verifyActionable(); final String dbName = insertMessage.getDB(); final String tableName = insertMessage.getTable(); final Map<String,String> ptnDesc = insertMessage.getPartitionKeyValues(); // Note : ptnDesc can be null or empty for non-ptn table return Collections.singletonList(new ImportCommand( ReplicationUtils.mapIfMapAvailable(dbName, dbNameMapping), ReplicationUtils.mapIfMapAvailable(tableName, tableNameMapping), ptnDesc, dstStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), dbName, // Note - important to retain the same key as the export tableName, ptnDesc) ), false, event.getEventId() )); }