public Iterable<? extends Command> getSrcWhCommands() { verifyActionable(); return Collections.singletonList(new ExportCommand( alterPartitionMessage.getDB(), alterPartitionMessage.getTable(), alterPartitionMessage.getKeyValues(), srcStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), alterPartitionMessage.getDB(), alterPartitionMessage.getTable(), alterPartitionMessage.getKeyValues()) ), true, event.getEventId() )); }
@Override public HCatEventMessage checkValid() { if (getTable() == null) throw new IllegalStateException("Table name unset."); if (getKeyValues() == null) throw new IllegalStateException("Partition values unset"); return super.checkValid(); } }
@Override public HCatEventMessage checkValid() { if (getTable() == null) throw new IllegalStateException("Table name unset."); if (getKeyValues() == null) throw new IllegalStateException("Partition values unset"); return super.checkValid(); } }
public Iterable<? extends Command> getDstWhCommands() { verifyActionable(); final String dstDbName = ReplicationUtils.mapIfMapAvailable(alterPartitionMessage.getDB(), dbNameMapping); final String dstTableName = ReplicationUtils.mapIfMapAvailable(alterPartitionMessage.getTable(), tableNameMapping); return Collections.singletonList(new ImportCommand( dstDbName, dstTableName, alterPartitionMessage.getKeyValues(), dstStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), alterPartitionMessage.getDB(), // Note - important to retain the same key as the export alterPartitionMessage.getTable(), alterPartitionMessage.getKeyValues()) ), true, event.getEventId() )); } }
@Override public HCatEventMessage checkValid() { if (getTable() == null) throw new IllegalStateException("Table name unset."); if (getKeyValues() == null) throw new IllegalStateException("Partition values unset"); return super.checkValid(); } }
public Iterable<? extends Command> getSrcWhCommands() { verifyActionable(); return Collections.singletonList(new ExportCommand( alterPartitionMessage.getDB(), alterPartitionMessage.getTable(), alterPartitionMessage.getKeyValues(), srcStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), alterPartitionMessage.getDB(), alterPartitionMessage.getTable(), alterPartitionMessage.getKeyValues()) ), true, event.getEventId() )); }
@Override public HCatEventMessage checkValid() { if (getTable() == null) throw new IllegalStateException("Table name unset."); if (getKeyValues() == null) throw new IllegalStateException("Partition values unset"); return super.checkValid(); } }
public Iterable<? extends Command> getSrcWhCommands() { verifyActionable(); return Collections.singletonList(new ExportCommand( alterPartitionMessage.getDB(), alterPartitionMessage.getTable(), alterPartitionMessage.getKeyValues(), srcStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), alterPartitionMessage.getDB(), alterPartitionMessage.getTable(), alterPartitionMessage.getKeyValues()) ), true, event.getEventId() )); }
public Iterable<? extends Command> getSrcWhCommands() { verifyActionable(); return Collections.singletonList(new ExportCommand( alterPartitionMessage.getDB(), alterPartitionMessage.getTable(), alterPartitionMessage.getKeyValues(), srcStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), alterPartitionMessage.getDB(), alterPartitionMessage.getTable(), alterPartitionMessage.getKeyValues()) ), true, event.getEventId() )); }
public Iterable<? extends Command> getDstWhCommands() { verifyActionable(); final String dstDbName = ReplicationUtils.mapIfMapAvailable(alterPartitionMessage.getDB(), dbNameMapping); final String dstTableName = ReplicationUtils.mapIfMapAvailable(alterPartitionMessage.getTable(), tableNameMapping); return Collections.singletonList(new ImportCommand( dstDbName, dstTableName, alterPartitionMessage.getKeyValues(), dstStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), alterPartitionMessage.getDB(), // Note - important to retain the same key as the export alterPartitionMessage.getTable(), alterPartitionMessage.getKeyValues()) ), true, event.getEventId() )); } }
public Iterable<? extends Command> getDstWhCommands() { verifyActionable(); final String dstDbName = ReplicationUtils.mapIfMapAvailable(alterPartitionMessage.getDB(), dbNameMapping); final String dstTableName = ReplicationUtils.mapIfMapAvailable(alterPartitionMessage.getTable(), tableNameMapping); return Collections.singletonList(new ImportCommand( dstDbName, dstTableName, alterPartitionMessage.getKeyValues(), dstStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), alterPartitionMessage.getDB(), // Note - important to retain the same key as the export alterPartitionMessage.getTable(), alterPartitionMessage.getKeyValues()) ), true, event.getEventId() )); } }
public Iterable<? extends Command> getDstWhCommands() { verifyActionable(); final String dstDbName = ReplicationUtils.mapIfMapAvailable(alterPartitionMessage.getDB(), dbNameMapping); final String dstTableName = ReplicationUtils.mapIfMapAvailable(alterPartitionMessage.getTable(), tableNameMapping); return Collections.singletonList(new ImportCommand( dstDbName, dstTableName, alterPartitionMessage.getKeyValues(), dstStagingDirProvider.getStagingDirectory( ReplicationUtils.getUniqueKey( getEvent().getEventId(), alterPartitionMessage.getDB(), // Note - important to retain the same key as the export alterPartitionMessage.getTable(), alterPartitionMessage.getKeyValues()) ), true, event.getEventId() )); } }