public ReplicationJob createJobForRenameTable(long auditLogId,long auditLogEntryCreateTime,Table renameFromTable,Table renameToTable) throws StateUpdateException {
  ReplicationOperation replicationOperation=ReplicationOperation.RENAME_TABLE;
  Map<String,String> extras=new HashMap<>();
  extras.put(PersistedJobInfo.AUDIT_LOG_ID_EXTRAS_KEY,Long.toString(auditLogId));
  extras.put(PersistedJobInfo.AUDIT_LOG_ENTRY_CREATE_TIME_KEY,Long.toString(auditLogEntryCreateTime));
  HiveObjectSpec renameFromTableSpec=new HiveObjectSpec(renameFromTable);
  HiveObjectSpec renameToTableSpec=new HiveObjectSpec(renameToTable);
  Optional<Path> renameFromPath=ReplicationUtils.getLocation(renameFromTable);
  Optional<Path> renameToPath=ReplicationUtils.getLocation(renameToTable);
  PersistedJobInfo persistedJobInfo=jobInfoStore.resilientCreate(replicationOperation,ReplicationStatus.PENDING,renameFromPath,srcCluster.getName(),renameFromTableSpec,new ArrayList<>(),ReplicationUtils.getTldt(renameFromTable),Optional.of(renameToTableSpec),renameToPath,extras);
  return new ReplicationJob(conf,new RenameTableTask(conf,srcCluster,destCluster,destinationObjectFactory,objectConflictHandler,renameFromTableSpec,renameToTableSpec,renameFromPath,renameToPath,ReplicationUtils.getTldt(renameFromTable),copyPartitionJobExecutor,directoryCopier),onStateChangeHandler,persistedJobInfo);
}

public ReplicationJob createJobForRenameTable ( long auditLogId , long auditLogEntryCreateTime , Table renameFromTable , Table renameToTable ) throws StateUpdateException { ReplicationOperation replicationOperation = ReplicationOperation . RENAME_TABLE ; Map < String , String > extras = new HashMap < > ( ) ; extras . put ( PersistedJobInfo . AUDIT_LOG_ID_EXTRAS_KEY , Long . toString ( auditLogId ) ) ; extras . put ( PersistedJobInfo . AUDIT_LOG_ENTRY_CREATE_TIME_KEY , Long . toString ( auditLogEntryCreateTime ) ) ; HiveObjectSpec renameFromTableSpec = new HiveObjectSpec ( renameFromTable ) ; HiveObjectSpec renameToTableSpec = new HiveObjectSpec ( renameToTable ) ; Optional < Path > renameFromPath = ReplicationUtils . getLocation ( renameFromTable ) ; Optional < Path > renameToPath = ReplicationUtils . getLocation ( renameToTable ) ; PersistedJobInfo persistedJobInfo = jobInfoStore . resilientCreate ( replicationOperation , ReplicationStatus . PENDING , renameFromPath , srcCluster . getName ( ) , renameFromTableSpec , new ArrayList < > ( ) , ReplicationUtils . getTldt ( renameFromTable ) , Optional . of ( renameToTableSpec ) , renameToPath , extras ) ; return new ReplicationJob ( conf , new RenameTableTask ( conf , srcCluster , destCluster , destinationObjectFactory , objectConflictHandler , renameFromTableSpec , renameToTableSpec , renameFromPath , renameToPath , ReplicationUtils . getTldt ( renameFromTable ) , copyPartitionJobExecutor , directoryCopier ) , onStateChangeHandler , persistedJobInfo ) ; }
create a job to rename a table .
