public void saveSlaveServer( SlaveServer slaveServer, ObjectId id_transformation, boolean isUsedByTransformation ) throws KettleException { try { saveSlaveServer( slaveServer, id_transformation, isUsedByTransformation, false ); } catch ( KettleObjectExistsException e ) { // This is an expected possibility here. Common objects are not going to overwrite database objects log.logBasic( e.getMessage() ); } }
updateCluster( clusterSchema ); } else { throw new KettleObjectExistsException( "Failed to save object to repository. Object [" + clusterSchema.getName() + "] already exists." );
case JOB: if ( getRepository().exists( newName, repositoryDirectoryInterface, RepositoryObjectType.JOB ) ) { throw new KettleObjectExistsException(); case TRANSFORMATION: if ( getRepository().exists( newName, repositoryDirectoryInterface, RepositoryObjectType.TRANSFORMATION ) ) { throw new KettleObjectExistsException(); throw new KettleObjectExistsException();
repository.delPartitions( partitionSchema.getObjectId() ); } else { throw new KettleObjectExistsException( "Failed to save object to repository. Object [" + partitionSchema.getName() + "] already exists." );
public void savePartitionSchema( PartitionSchema partitionSchema, ObjectId id_transformation, boolean isUsedByTransformation ) throws KettleException { try { savePartitionSchema( partitionSchema, id_transformation, isUsedByTransformation, false ); } catch ( KettleObjectExistsException e ) { // This is an expected possibility here. Common objects are not going to overwrite database objects log.logBasic( e.getMessage() ); } }
updateSlave( slaveServer ); } else { throw new KettleObjectExistsException( "Failed to save object to repository. Object [" + slaveServer.getName() + "] already exists." );
public void saveClusterSchema( ClusterSchema clusterSchema, String versionComment, ObjectId id_transformation, boolean isUsedByTransformation ) throws KettleException { try { saveClusterSchema( clusterSchema, versionComment, id_transformation, isUsedByTransformation, false ); } catch ( KettleObjectExistsException e ) { // This is an expected possibility here. Common objects are not going to overwrite database objects log.logBasic( e.getMessage() ); } }
private synchronized ObjectId insertCluster( ClusterSchema clusterSchema ) throws KettleException { if ( getClusterID( clusterSchema.getName() ) != null ) { throw new KettleObjectExistsException( "Failed to create object in repository. Object [" + clusterSchema.getName() + "] already exists." );
public synchronized ObjectId insertPartitionSchema( PartitionSchema partitionSchema ) throws KettleException { if ( getPartitionSchemaID( partitionSchema.getName() ) != null ) { // This partition schema name is already in use. Throw an exception. throw new KettleObjectExistsException( "Failed to create object in repository. Object [" + partitionSchema.getName() + "] already exists." ); } ObjectId id = repository.connectionDelegate.getNextPartitionSchemaID(); RowMetaAndData table = new RowMetaAndData(); table.addValue( new ValueMetaInteger( KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_ID_PARTITION_SCHEMA ), id ); table.addValue( new ValueMetaString( KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_NAME ), partitionSchema.getName() ); table.addValue( new ValueMetaBoolean( KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_DYNAMIC_DEFINITION ), partitionSchema.isDynamicallyDefined() ); table.addValue( new ValueMetaString( KettleDatabaseRepository.FIELD_PARTITION_SCHEMA_PARTITIONS_PER_SLAVE ), partitionSchema.getNumberOfPartitionsPerSlave() ); repository.connectionDelegate.getDatabase().prepareInsert( table.getRowMeta(), KettleDatabaseRepository.TABLE_R_PARTITION_SCHEMA ); repository.connectionDelegate.getDatabase().setValuesInsert( table ); repository.connectionDelegate.getDatabase().insertRow(); repository.connectionDelegate.getDatabase().closeInsert(); return id; }
public synchronized ObjectId insertSlave( SlaveServer slaveServer ) throws KettleException { if ( getSlaveID( slaveServer.getName() ) != null ) { throw new KettleObjectExistsException( "Failed to create object in repository. Object [" + slaveServer.getName() + "] already exists." );