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(expected = NullPointerException.class) public void copyWithNullDestinationParamThrowsException() throws IOException { File source = temporaryFolder.newFile("test.txt"); schemaCopier.copy(source.toString(), null, eventTableReplication, eventId); }
public Path copy(String source, String destination, EventTableReplication eventTableReplication, String eventId) { checkNotNull(source, "source cannot be null"); checkNotNull(destination, "destinationFolder cannot be null"); FileSystemPathResolver sourceFileSystemPathResolver = new FileSystemPathResolver(sourceHiveConf...
SchemaCopier { public Path copy(String source, String destination, EventTableReplication eventTableReplication, String eventId) { checkNotNull(source, "source cannot be null"); checkNotNull(destination, "destinationFolder cannot be null"); FileSystemPathResolver sourceFileSystemPathResolver = new FileSystemPathResolver...
SchemaCopier { public Path copy(String source, String destination, EventTableReplication eventTableReplication, String eventId) { checkNotNull(source, "source cannot be null"); checkNotNull(destination, "destinationFolder cannot be null"); FileSystemPathResolver sourceFileSystemPathResolver = new FileSystemPathResolver...
SchemaCopier { public Path copy(String source, String destination, EventTableReplication eventTableReplication, String eventId) { checkNotNull(source, "source cannot be null"); checkNotNull(destination, "destinationFolder cannot be null"); FileSystemPathResolver sourceFileSystemPathResolver = new FileSystemPathResolver...
SchemaCopier { public Path copy(String source, String destination, EventTableReplication eventTableReplication, String eventId) { checkNotNull(source, "source cannot be null"); checkNotNull(destination, "destinationFolder cannot be null"); FileSystemPathResolver sourceFileSystemPathResolver = new FileSystemPathResolver...
@Test(expected = IllegalArgumentException.class) public void copyWithEmptyDestinationParamThrowsException() throws IOException { File source = temporaryFolder.newFile("test.txt"); schemaCopier.copy(source.toString(), "", eventTableReplication, eventId); }
public Path copy(String source, String destination, EventTableReplication eventTableReplication, String eventId) { checkNotNull(source, "source cannot be null"); checkNotNull(destination, "destinationFolder cannot be null"); FileSystemPathResolver sourceFileSystemPathResolver = new FileSystemPathResolver(sourceHiveConf...
SchemaCopier { public Path copy(String source, String destination, EventTableReplication eventTableReplication, String eventId) { checkNotNull(source, "source cannot be null"); checkNotNull(destination, "destinationFolder cannot be null"); FileSystemPathResolver sourceFileSystemPathResolver = new FileSystemPathResolver...
SchemaCopier { public Path copy(String source, String destination, EventTableReplication eventTableReplication, String eventId) { checkNotNull(source, "source cannot be null"); checkNotNull(destination, "destinationFolder cannot be null"); FileSystemPathResolver sourceFileSystemPathResolver = new FileSystemPathResolver...
SchemaCopier { public Path copy(String source, String destination, EventTableReplication eventTableReplication, String eventId) { checkNotNull(source, "source cannot be null"); checkNotNull(destination, "destinationFolder cannot be null"); FileSystemPathResolver sourceFileSystemPathResolver = new FileSystemPathResolver...
SchemaCopier { public Path copy(String source, String destination, EventTableReplication eventTableReplication, String eventId) { checkNotNull(source, "source cannot be null"); checkNotNull(destination, "destinationFolder cannot be null"); FileSystemPathResolver sourceFileSystemPathResolver = new FileSystemPathResolver...
@Test public void transformNoAvro() { transformation.transform(table); verifyZeroInteractions(schemaCopier); assertThat(table, is(newTable())); }
@Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
@Test public void missingEventId() { transformation.transform(table); verifyZeroInteractions(schemaCopier); assertThat(table, is(newTable())); }
@Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
@Test public void missingAvroDestinationFolder() { EventReplicaTable eventReplicaTable = new EventReplicaTable("db", "table", "location"); when(tableReplicationEvent.getReplicaTable()).thenReturn(eventReplicaTable); transformation.tableReplicationStart(tableReplicationEvent, "eventId"); transformation.transform(table);...
@Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
@Test public void setS3ServerSideEncryption() throws Exception { copierOptions.put(S3S3CopierOptions.Keys.S3_SERVER_SIDE_ENCRYPTION.keyName(), "true"); S3S3CopierOptions options = new S3S3CopierOptions(copierOptions); assertThat(options.isS3ServerSideEncryption(), is(true)); }
public Boolean isS3ServerSideEncryption() { return MapUtils.getBoolean(copierOptions, Keys.S3_SERVER_SIDE_ENCRYPTION.keyName(), false); }
S3S3CopierOptions { public Boolean isS3ServerSideEncryption() { return MapUtils.getBoolean(copierOptions, Keys.S3_SERVER_SIDE_ENCRYPTION.keyName(), false); } }
S3S3CopierOptions { public Boolean isS3ServerSideEncryption() { return MapUtils.getBoolean(copierOptions, Keys.S3_SERVER_SIDE_ENCRYPTION.keyName(), false); } S3S3CopierOptions(); S3S3CopierOptions(Map<String, Object> copierOptions); }
S3S3CopierOptions { public Boolean isS3ServerSideEncryption() { return MapUtils.getBoolean(copierOptions, Keys.S3_SERVER_SIDE_ENCRYPTION.keyName(), false); } S3S3CopierOptions(); S3S3CopierOptions(Map<String, Object> copierOptions); void setMaxThreadPoolSize(int maxThreadPoolSize); int getMaxThreadPoolSize(); Long get...
S3S3CopierOptions { public Boolean isS3ServerSideEncryption() { return MapUtils.getBoolean(copierOptions, Keys.S3_SERVER_SIDE_ENCRYPTION.keyName(), false); } S3S3CopierOptions(); S3S3CopierOptions(Map<String, Object> copierOptions); void setMaxThreadPoolSize(int maxThreadPoolSize); int getMaxThreadPoolSize(); Long get...
@Test public void missingReplicaTableLocation() { EventReplicaTable eventReplicaTable = new EventReplicaTable("db", "table", null); when(tableReplicationEvent.getReplicaTable()).thenReturn(eventReplicaTable); transformation.tableReplicationStart(tableReplicationEvent, "eventId"); transformation.transform(table); verify...
@Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
@Test public void transformNoSourceUrl() throws Exception { EventReplicaTable eventReplicaTable = new EventReplicaTable("db", "table", "location"); when(tableReplicationEvent.getReplicaTable()).thenReturn(eventReplicaTable); transformation.tableReplicationStart(tableReplicationEvent, "eventId"); Table result = transfor...
@Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
@Test public void transformNoTargetSchemaLocationSpecifiedUseDefault() throws Exception { EventReplicaTable eventReplicaTable = new EventReplicaTable("db", "table", "location"); when(tableReplicationEvent.getReplicaTable()).thenReturn(eventReplicaTable); HiveObjectUtils.updateSerDeUrl(table, AVRO_SCHEMA_URL_PARAMETER, ...
@Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
@Test public void transform() throws Exception { EventReplicaTable eventReplicaTable = new EventReplicaTable("db", "table", "location"); when(tableReplicationEvent.getReplicaTable()).thenReturn(eventReplicaTable); HiveObjectUtils.updateSerDeUrl(table, AVRO_SCHEMA_URL_PARAMETER, "avroSourceUrl"); when(schemaCopier.copy(...
@Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
@Test public void transformOverride() throws Exception { Map<String, Object> avroOverrideOptions = new HashMap<>(); avroOverrideOptions.put(AvroSerDeConfig.BASE_URL, "schemaOverride"); Map<String, Object> transformOptions = new HashMap<>(); transformOptions.put(AVRO_SERDE_OPTIONS, avroOverrideOptions); when(tableReplic...
@Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } }
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
AvroSerDeTableTransformation extends AbstractAvroSerDeTransformation implements TableTransformation { @Override public Table transform(Table table) { if (avroTransformationSpecified()) { table = apply(table, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return table; } @Autowir...
@Test public void transformNoAvro() { transformation.transform(partition); verifyZeroInteractions(schemaCopier); assertThat(partition, is(newPartition())); }
@Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return partition; }
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
@Test public void missingEventId() { transformation.transform(partition); verifyZeroInteractions(schemaCopier); assertThat(partition, is(newPartition())); }
@Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return partition; }
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
@Test public void missingAvroDestinationFolder() { EventReplicaTable eventReplicaTable = new EventReplicaTable("db", "table", "location"); when(tableReplicationEvent.getReplicaTable()).thenReturn(eventReplicaTable); transformation.tableReplicationStart(tableReplicationEvent, "eventId"); transformation.transform(partiti...
@Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return partition; }
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
@Test public void transformNoSourceUrl() throws Exception { EventReplicaTable eventReplicaTable = new EventReplicaTable("db", "table", "location"); when(tableReplicationEvent.getReplicaTable()).thenReturn(eventReplicaTable); transformation.tableReplicationStart(tableReplicationEvent, "eventId"); Partition result = tran...
@Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return partition; }
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
@Test public void transform() throws Exception { EventReplicaTable eventReplicaTable = new EventReplicaTable("db", "table", "location"); when(tableReplicationEvent.getReplicaTable()).thenReturn(eventReplicaTable); transformation.tableReplicationStart(tableReplicationEvent, "eventId"); HiveObjectUtils.updateSerDeUrl(par...
@Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation())); } return partition; }
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
AvroSerDePartitionTransformation extends AbstractAvroSerDeTransformation implements PartitionTransformation { @Override public Partition transform(Partition partition) { if (avroTransformationSpecified()) { partition = apply(partition, avroDestination(getAvroSchemaDestinationFolder(), getEventId(), getTableLocation()))...
@Test public void defaultS3ServerSideEncryption() throws Exception { S3S3CopierOptions options = new S3S3CopierOptions(copierOptions); assertThat(options.isS3ServerSideEncryption(), is(false)); }
public Boolean isS3ServerSideEncryption() { return MapUtils.getBoolean(copierOptions, Keys.S3_SERVER_SIDE_ENCRYPTION.keyName(), false); }
S3S3CopierOptions { public Boolean isS3ServerSideEncryption() { return MapUtils.getBoolean(copierOptions, Keys.S3_SERVER_SIDE_ENCRYPTION.keyName(), false); } }
S3S3CopierOptions { public Boolean isS3ServerSideEncryption() { return MapUtils.getBoolean(copierOptions, Keys.S3_SERVER_SIDE_ENCRYPTION.keyName(), false); } S3S3CopierOptions(); S3S3CopierOptions(Map<String, Object> copierOptions); }
S3S3CopierOptions { public Boolean isS3ServerSideEncryption() { return MapUtils.getBoolean(copierOptions, Keys.S3_SERVER_SIDE_ENCRYPTION.keyName(), false); } S3S3CopierOptions(); S3S3CopierOptions(Map<String, Object> copierOptions); void setMaxThreadPoolSize(int maxThreadPoolSize); int getMaxThreadPoolSize(); Long get...
S3S3CopierOptions { public Boolean isS3ServerSideEncryption() { return MapUtils.getBoolean(copierOptions, Keys.S3_SERVER_SIDE_ENCRYPTION.keyName(), false); } S3S3CopierOptions(); S3S3CopierOptions(Map<String, Object> copierOptions); void setMaxThreadPoolSize(int maxThreadPoolSize); int getMaxThreadPoolSize(); Long get...
@Test public void testGetSnapshottingSettings() throws Exception { ExecutionJobVertex jobVertex = mock(ExecutionJobVertex.class); when(jobVertex.getJobVertexId()).thenReturn(new JobVertexID()); when(jobVertex.getParallelism()).thenReturn(1); JobCheckpointingSettings snapshottingSettings = new JobCheckpointingSettings( ...
public CheckpointCoordinatorConfiguration getJobCheckpointingConfiguration() { return jobCheckpointingConfiguration; }
CheckpointStatsTracker { public CheckpointCoordinatorConfiguration getJobCheckpointingConfiguration() { return jobCheckpointingConfiguration; } }
CheckpointStatsTracker { public CheckpointCoordinatorConfiguration getJobCheckpointingConfiguration() { return jobCheckpointingConfiguration; } CheckpointStatsTracker( int numRememberedCheckpoints, List<ExecutionJobVertex> jobVertices, CheckpointCoordinatorConfiguration jobCheckpointingConfiguration, MetricGrou...
CheckpointStatsTracker { public CheckpointCoordinatorConfiguration getJobCheckpointingConfiguration() { return jobCheckpointingConfiguration; } CheckpointStatsTracker( int numRememberedCheckpoints, List<ExecutionJobVertex> jobVertices, CheckpointCoordinatorConfiguration jobCheckpointingConfiguration, MetricGrou...
CheckpointStatsTracker { public CheckpointCoordinatorConfiguration getJobCheckpointingConfiguration() { return jobCheckpointingConfiguration; } CheckpointStatsTracker( int numRememberedCheckpoints, List<ExecutionJobVertex> jobVertices, CheckpointCoordinatorConfiguration jobCheckpointingConfiguration, MetricGrou...
@Test public void testReportSubtaskStats() throws Exception { long checkpointId = Integer.MAX_VALUE + 1222L; long triggerTimestamp = Integer.MAX_VALUE - 1239L; CheckpointProperties props = CheckpointProperties.forCheckpoint(CheckpointRetentionPolicy.NEVER_RETAIN_AFTER_TERMINATION); TaskStateStats task1 = new TaskStateS...
boolean reportSubtaskStats(JobVertexID jobVertexId, SubtaskStateStats subtask) { TaskStateStats taskStateStats = taskStats.get(jobVertexId); if (taskStateStats != null && taskStateStats.reportSubtaskStats(subtask)) { currentNumAcknowledgedSubtasks++; latestAcknowledgedSubtask = subtask; currentStateSize += subtask.getS...
PendingCheckpointStats extends AbstractCheckpointStats { boolean reportSubtaskStats(JobVertexID jobVertexId, SubtaskStateStats subtask) { TaskStateStats taskStateStats = taskStats.get(jobVertexId); if (taskStateStats != null && taskStateStats.reportSubtaskStats(subtask)) { currentNumAcknowledgedSubtasks++; latestAcknow...
PendingCheckpointStats extends AbstractCheckpointStats { boolean reportSubtaskStats(JobVertexID jobVertexId, SubtaskStateStats subtask) { TaskStateStats taskStateStats = taskStats.get(jobVertexId); if (taskStateStats != null && taskStateStats.reportSubtaskStats(subtask)) { currentNumAcknowledgedSubtasks++; latestAcknow...
PendingCheckpointStats extends AbstractCheckpointStats { boolean reportSubtaskStats(JobVertexID jobVertexId, SubtaskStateStats subtask) { TaskStateStats taskStateStats = taskStats.get(jobVertexId); if (taskStateStats != null && taskStateStats.reportSubtaskStats(subtask)) { currentNumAcknowledgedSubtasks++; latestAcknow...
PendingCheckpointStats extends AbstractCheckpointStats { boolean reportSubtaskStats(JobVertexID jobVertexId, SubtaskStateStats subtask) { TaskStateStats taskStateStats = taskStats.get(jobVertexId); if (taskStateStats != null && taskStateStats.reportSubtaskStats(subtask)) { currentNumAcknowledgedSubtasks++; latestAcknow...
@Test public void testReportCompletedCheckpoint() throws Exception { TaskStateStats task1 = new TaskStateStats(new JobVertexID(), 3); TaskStateStats task2 = new TaskStateStats(new JobVertexID(), 4); HashMap<JobVertexID, TaskStateStats> taskStats = new HashMap<>(); taskStats.put(task1.getJobVertexId(), task1); taskStats...
CompletedCheckpointStats.DiscardCallback reportCompletedCheckpoint(String externalPointer) { CompletedCheckpointStats completed = new CompletedCheckpointStats( checkpointId, triggerTimestamp, props, numberOfSubtasks, new HashMap<>(taskStats), currentNumAcknowledgedSubtasks, currentStateSize, currentAlignmentBuffered, l...
PendingCheckpointStats extends AbstractCheckpointStats { CompletedCheckpointStats.DiscardCallback reportCompletedCheckpoint(String externalPointer) { CompletedCheckpointStats completed = new CompletedCheckpointStats( checkpointId, triggerTimestamp, props, numberOfSubtasks, new HashMap<>(taskStats), currentNumAcknowledg...
PendingCheckpointStats extends AbstractCheckpointStats { CompletedCheckpointStats.DiscardCallback reportCompletedCheckpoint(String externalPointer) { CompletedCheckpointStats completed = new CompletedCheckpointStats( checkpointId, triggerTimestamp, props, numberOfSubtasks, new HashMap<>(taskStats), currentNumAcknowledg...
PendingCheckpointStats extends AbstractCheckpointStats { CompletedCheckpointStats.DiscardCallback reportCompletedCheckpoint(String externalPointer) { CompletedCheckpointStats completed = new CompletedCheckpointStats( checkpointId, triggerTimestamp, props, numberOfSubtasks, new HashMap<>(taskStats), currentNumAcknowledg...
PendingCheckpointStats extends AbstractCheckpointStats { CompletedCheckpointStats.DiscardCallback reportCompletedCheckpoint(String externalPointer) { CompletedCheckpointStats completed = new CompletedCheckpointStats( checkpointId, triggerTimestamp, props, numberOfSubtasks, new HashMap<>(taskStats), currentNumAcknowledg...
@Test public void testReportFailedCheckpoint() throws Exception { TaskStateStats task1 = new TaskStateStats(new JobVertexID(), 3); TaskStateStats task2 = new TaskStateStats(new JobVertexID(), 4); HashMap<JobVertexID, TaskStateStats> taskStats = new HashMap<>(); taskStats.put(task1.getJobVertexId(), task1); taskStats.pu...
void reportFailedCheckpoint(long failureTimestamp, @Nullable Throwable cause) { FailedCheckpointStats failed = new FailedCheckpointStats( checkpointId, triggerTimestamp, props, numberOfSubtasks, new HashMap<>(taskStats), currentNumAcknowledgedSubtasks, currentStateSize, currentAlignmentBuffered, failureTimestamp, lates...
PendingCheckpointStats extends AbstractCheckpointStats { void reportFailedCheckpoint(long failureTimestamp, @Nullable Throwable cause) { FailedCheckpointStats failed = new FailedCheckpointStats( checkpointId, triggerTimestamp, props, numberOfSubtasks, new HashMap<>(taskStats), currentNumAcknowledgedSubtasks, currentSta...
PendingCheckpointStats extends AbstractCheckpointStats { void reportFailedCheckpoint(long failureTimestamp, @Nullable Throwable cause) { FailedCheckpointStats failed = new FailedCheckpointStats( checkpointId, triggerTimestamp, props, numberOfSubtasks, new HashMap<>(taskStats), currentNumAcknowledgedSubtasks, currentSta...
PendingCheckpointStats extends AbstractCheckpointStats { void reportFailedCheckpoint(long failureTimestamp, @Nullable Throwable cause) { FailedCheckpointStats failed = new FailedCheckpointStats( checkpointId, triggerTimestamp, props, numberOfSubtasks, new HashMap<>(taskStats), currentNumAcknowledgedSubtasks, currentSta...
PendingCheckpointStats extends AbstractCheckpointStats { void reportFailedCheckpoint(long failureTimestamp, @Nullable Throwable cause) { FailedCheckpointStats failed = new FailedCheckpointStats( checkpointId, triggerTimestamp, props, numberOfSubtasks, new HashMap<>(taskStats), currentNumAcknowledgedSubtasks, currentSta...
@Test public void testCheckpointProperties() { CheckpointProperties props = CheckpointProperties.forCheckpoint(CheckpointRetentionPolicy.RETAIN_ON_FAILURE); assertFalse(props.forceCheckpoint()); assertTrue(props.discardOnSubsumed()); assertTrue(props.discardOnJobFinished()); assertTrue(props.discardOnJobCancelled()); a...
@VisibleForTesting CheckpointProperties( boolean forced, CheckpointType checkpointType, boolean discardSubsumed, boolean discardFinished, boolean discardCancelled, boolean discardFailed, boolean discardSuspended) { this.forced = forced; this.checkpointType = checkNotNull(checkpointType); this.discardSubsumed = discardS...
CheckpointProperties implements Serializable { @VisibleForTesting CheckpointProperties( boolean forced, CheckpointType checkpointType, boolean discardSubsumed, boolean discardFinished, boolean discardCancelled, boolean discardFailed, boolean discardSuspended) { this.forced = forced; this.checkpointType = checkNotNull(c...
CheckpointProperties implements Serializable { @VisibleForTesting CheckpointProperties( boolean forced, CheckpointType checkpointType, boolean discardSubsumed, boolean discardFinished, boolean discardCancelled, boolean discardFailed, boolean discardSuspended) { this.forced = forced; this.checkpointType = checkNotNull(c...
CheckpointProperties implements Serializable { @VisibleForTesting CheckpointProperties( boolean forced, CheckpointType checkpointType, boolean discardSubsumed, boolean discardFinished, boolean discardCancelled, boolean discardFailed, boolean discardSuspended) { this.forced = forced; this.checkpointType = checkNotNull(c...
CheckpointProperties implements Serializable { @VisibleForTesting CheckpointProperties( boolean forced, CheckpointType checkpointType, boolean discardSubsumed, boolean discardFinished, boolean discardCancelled, boolean discardFailed, boolean discardSuspended) { this.forced = forced; this.checkpointType = checkNotNull(c...
@Test public void testIsSavepoint() throws Exception { { CheckpointProperties props = CheckpointProperties.forCheckpoint(CheckpointRetentionPolicy.RETAIN_ON_FAILURE); assertFalse(props.isSavepoint()); } { CheckpointProperties props = CheckpointProperties.forCheckpoint(CheckpointRetentionPolicy.RETAIN_ON_CANCELLATION); ...
public boolean isSavepoint() { return checkpointType == CheckpointType.SAVEPOINT; }
CheckpointProperties implements Serializable { public boolean isSavepoint() { return checkpointType == CheckpointType.SAVEPOINT; } }
CheckpointProperties implements Serializable { public boolean isSavepoint() { return checkpointType == CheckpointType.SAVEPOINT; } @VisibleForTesting CheckpointProperties( boolean forced, CheckpointType checkpointType, boolean discardSubsumed, boolean discardFinished, boolean discardCancelled, boolea...
CheckpointProperties implements Serializable { public boolean isSavepoint() { return checkpointType == CheckpointType.SAVEPOINT; } @VisibleForTesting CheckpointProperties( boolean forced, CheckpointType checkpointType, boolean discardSubsumed, boolean discardFinished, boolean discardCancelled, boolea...
CheckpointProperties implements Serializable { public boolean isSavepoint() { return checkpointType == CheckpointType.SAVEPOINT; } @VisibleForTesting CheckpointProperties( boolean forced, CheckpointType checkpointType, boolean discardSubsumed, boolean discardFinished, boolean discardCancelled, boolea...
@Test public void testHasState() { StateObjectCollection<StateObject> stateObjects = new StateObjectCollection<>(new ArrayList<>()); Assert.assertFalse(stateObjects.hasState()); stateObjects = new StateObjectCollection<>(Collections.singletonList(null)); Assert.assertFalse(stateObjects.hasState()); stateObjects = new S...
public boolean hasState() { for (StateObject state : stateObjects) { if (state != null) { return true; } } return false; }
StateObjectCollection implements Collection<T>, StateObject { public boolean hasState() { for (StateObject state : stateObjects) { if (state != null) { return true; } } return false; } }
StateObjectCollection implements Collection<T>, StateObject { public boolean hasState() { for (StateObject state : stateObjects) { if (state != null) { return true; } } return false; } StateObjectCollection(); StateObjectCollection(Collection<T> stateObjects); }
StateObjectCollection implements Collection<T>, StateObject { public boolean hasState() { for (StateObject state : stateObjects) { if (state != null) { return true; } } return false; } StateObjectCollection(); StateObjectCollection(Collection<T> stateObjects); @Override int size(); @Override boolean isEmpty(); @Overri...
StateObjectCollection implements Collection<T>, StateObject { public boolean hasState() { for (StateObject state : stateObjects) { if (state != null) { return true; } } return false; } StateObjectCollection(); StateObjectCollection(Collection<T> stateObjects); @Override int size(); @Override boolean isEmpty(); @Overri...
@Test public void testMinDelayBetweenSavepoints() throws Exception { JobID jobId = new JobID(); final ExecutionAttemptID attemptID1 = new ExecutionAttemptID(); ExecutionVertex vertex1 = mockExecutionVertex(attemptID1); CheckpointCoordinator coord = new CheckpointCoordinator( jobId, 100000, 200000, 100000000L, 1, Checkp...
public CompletableFuture<CompletedCheckpoint> triggerSavepoint( long timestamp, @Nullable String targetLocation) { CheckpointProperties props = CheckpointProperties.forSavepoint(); CheckpointTriggerResult triggerResult = triggerCheckpoint( timestamp, props, targetLocation, false); if (triggerResult.isSuccess()) { retur...
CheckpointCoordinator { public CompletableFuture<CompletedCheckpoint> triggerSavepoint( long timestamp, @Nullable String targetLocation) { CheckpointProperties props = CheckpointProperties.forSavepoint(); CheckpointTriggerResult triggerResult = triggerCheckpoint( timestamp, props, targetLocation, false); if (triggerRes...
CheckpointCoordinator { public CompletableFuture<CompletedCheckpoint> triggerSavepoint( long timestamp, @Nullable String targetLocation) { CheckpointProperties props = CheckpointProperties.forSavepoint(); CheckpointTriggerResult triggerResult = triggerCheckpoint( timestamp, props, targetLocation, false); if (triggerRes...
CheckpointCoordinator { public CompletableFuture<CompletedCheckpoint> triggerSavepoint( long timestamp, @Nullable String targetLocation) { CheckpointProperties props = CheckpointProperties.forSavepoint(); CheckpointTriggerResult triggerResult = triggerCheckpoint( timestamp, props, targetLocation, false); if (triggerRes...
CheckpointCoordinator { public CompletableFuture<CompletedCheckpoint> triggerSavepoint( long timestamp, @Nullable String targetLocation) { CheckpointProperties props = CheckpointProperties.forSavepoint(); CheckpointTriggerResult triggerResult = triggerCheckpoint( timestamp, props, targetLocation, false); if (triggerRes...
@Test public void testStopPeriodicScheduler() throws Exception { final ExecutionAttemptID attemptID1 = new ExecutionAttemptID(); ExecutionVertex vertex1 = mockExecutionVertex(attemptID1); CheckpointCoordinator coord = new CheckpointCoordinator( new JobID(), 600000, 600000, 0, Integer.MAX_VALUE, CheckpointRetentionPolic...
public boolean triggerCheckpoint(long timestamp, boolean isPeriodic) { return triggerCheckpoint(timestamp, checkpointProperties, null, isPeriodic).isSuccess(); }
CheckpointCoordinator { public boolean triggerCheckpoint(long timestamp, boolean isPeriodic) { return triggerCheckpoint(timestamp, checkpointProperties, null, isPeriodic).isSuccess(); } }
CheckpointCoordinator { public boolean triggerCheckpoint(long timestamp, boolean isPeriodic) { return triggerCheckpoint(timestamp, checkpointProperties, null, isPeriodic).isSuccess(); } CheckpointCoordinator( JobID job, long baseInterval, long checkpointTimeout, long minPauseBetweenCheckpoints, int maxCo...
CheckpointCoordinator { public boolean triggerCheckpoint(long timestamp, boolean isPeriodic) { return triggerCheckpoint(timestamp, checkpointProperties, null, isPeriodic).isSuccess(); } CheckpointCoordinator( JobID job, long baseInterval, long checkpointTimeout, long minPauseBetweenCheckpoints, int maxCo...
CheckpointCoordinator { public boolean triggerCheckpoint(long timestamp, boolean isPeriodic) { return triggerCheckpoint(timestamp, checkpointProperties, null, isPeriodic).isSuccess(); } CheckpointCoordinator( JobID job, long baseInterval, long checkpointTimeout, long minPauseBetweenCheckpoints, int maxCo...
@Test public void testEndToEndDuration() throws Exception { long duration = 123912931293L; long triggerTimestamp = 10123; long failureTimestamp = triggerTimestamp + duration; Map<JobVertexID, TaskStateStats> taskStats = new HashMap<>(); JobVertexID jobVertexId = new JobVertexID(); taskStats.put(jobVertexId, new TaskSta...
@Override public long getEndToEndDuration() { return Math.max(0, failureTimestamp - triggerTimestamp); }
FailedCheckpointStats extends AbstractCheckpointStats { @Override public long getEndToEndDuration() { return Math.max(0, failureTimestamp - triggerTimestamp); } }
FailedCheckpointStats extends AbstractCheckpointStats { @Override public long getEndToEndDuration() { return Math.max(0, failureTimestamp - triggerTimestamp); } FailedCheckpointStats( long checkpointId, long triggerTimestamp, CheckpointProperties props, int totalSubtaskCount, Map<JobVertexID, TaskStateSt...
FailedCheckpointStats extends AbstractCheckpointStats { @Override public long getEndToEndDuration() { return Math.max(0, failureTimestamp - triggerTimestamp); } FailedCheckpointStats( long checkpointId, long triggerTimestamp, CheckpointProperties props, int totalSubtaskCount, Map<JobVertexID, TaskStateSt...
FailedCheckpointStats extends AbstractCheckpointStats { @Override public long getEndToEndDuration() { return Math.max(0, failureTimestamp - triggerTimestamp); } FailedCheckpointStats( long checkpointId, long triggerTimestamp, CheckpointProperties props, int totalSubtaskCount, Map<JobVertexID, TaskStateSt...
@Test public void testIsNotSuccess() throws Exception { final JobResult jobResult = new JobResult.Builder() .jobId(new JobID()) .serializedThrowable(new SerializedThrowable(new RuntimeException())) .netRuntime(Long.MAX_VALUE) .build(); assertThat(jobResult.isSuccess(), equalTo(false)); }
public boolean isSuccess() { return serializedThrowable == null; }
JobResult implements Serializable { public boolean isSuccess() { return serializedThrowable == null; } }
JobResult implements Serializable { public boolean isSuccess() { return serializedThrowable == null; } private JobResult( final JobID jobId, final Map<String, SerializedValue<OptionalFailure<Object>>> accumulatorResults, final long netRuntime, @Nullable final SerializedThrowable serializedThrowable); }
JobResult implements Serializable { public boolean isSuccess() { return serializedThrowable == null; } private JobResult( final JobID jobId, final Map<String, SerializedValue<OptionalFailure<Object>>> accumulatorResults, final long netRuntime, @Nullable final SerializedThrowable serializedThrowable); boole...
JobResult implements Serializable { public boolean isSuccess() { return serializedThrowable == null; } private JobResult( final JobID jobId, final Map<String, SerializedValue<OptionalFailure<Object>>> accumulatorResults, final long netRuntime, @Nullable final SerializedThrowable serializedThrowable); boole...
@Test public void testIsSuccess() throws Exception { final JobResult jobResult = new JobResult.Builder() .jobId(new JobID()) .netRuntime(Long.MAX_VALUE) .build(); assertThat(jobResult.isSuccess(), equalTo(true)); }
public boolean isSuccess() { return serializedThrowable == null; }
JobResult implements Serializable { public boolean isSuccess() { return serializedThrowable == null; } }
JobResult implements Serializable { public boolean isSuccess() { return serializedThrowable == null; } private JobResult( final JobID jobId, final Map<String, SerializedValue<OptionalFailure<Object>>> accumulatorResults, final long netRuntime, @Nullable final SerializedThrowable serializedThrowable); }
JobResult implements Serializable { public boolean isSuccess() { return serializedThrowable == null; } private JobResult( final JobID jobId, final Map<String, SerializedValue<OptionalFailure<Object>>> accumulatorResults, final long netRuntime, @Nullable final SerializedThrowable serializedThrowable); boole...
JobResult implements Serializable { public boolean isSuccess() { return serializedThrowable == null; } private JobResult( final JobID jobId, final Map<String, SerializedValue<OptionalFailure<Object>>> accumulatorResults, final long netRuntime, @Nullable final SerializedThrowable serializedThrowable); boole...
@Test public void testHeartbeatTimeoutWithResourceManager() throws Exception { final String resourceManagerAddress = "rm"; final ResourceManagerId resourceManagerId = ResourceManagerId.generate(); final ResourceID rmResourceId = new ResourceID(resourceManagerAddress); final TestingResourceManagerGateway resourceManager...
@Override public void start() { throw new UnsupportedOperationException("Should never call start() without leader ID"); }
JobMaster extends FencedRpcEndpoint<JobMasterId> implements JobMasterGateway { @Override public void start() { throw new UnsupportedOperationException("Should never call start() without leader ID"); } }
JobMaster extends FencedRpcEndpoint<JobMasterId> implements JobMasterGateway { @Override public void start() { throw new UnsupportedOperationException("Should never call start() without leader ID"); } JobMaster( RpcService rpcService, JobMasterConfiguration jobMasterConfiguration, ResourceID resourceId, Job...
JobMaster extends FencedRpcEndpoint<JobMasterId> implements JobMasterGateway { @Override public void start() { throw new UnsupportedOperationException("Should never call start() without leader ID"); } JobMaster( RpcService rpcService, JobMasterConfiguration jobMasterConfiguration, ResourceID resourceId, Job...
JobMaster extends FencedRpcEndpoint<JobMasterId> implements JobMasterGateway { @Override public void start() { throw new UnsupportedOperationException("Should never call start() without leader ID"); } JobMaster( RpcService rpcService, JobMasterConfiguration jobMasterConfiguration, ResourceID resourceId, Job...
@Test public void testCloseUnestablishedResourceManagerConnection() throws Exception { final JobMaster jobMaster = createJobMaster( JobMasterConfiguration.fromConfiguration(configuration), jobGraph, haServices, new TestingJobManagerSharedServicesBuilder().build()); try { jobMaster.start(JobMasterId.generate(), testingT...
@Override public void start() { throw new UnsupportedOperationException("Should never call start() without leader ID"); }
JobMaster extends FencedRpcEndpoint<JobMasterId> implements JobMasterGateway { @Override public void start() { throw new UnsupportedOperationException("Should never call start() without leader ID"); } }
JobMaster extends FencedRpcEndpoint<JobMasterId> implements JobMasterGateway { @Override public void start() { throw new UnsupportedOperationException("Should never call start() without leader ID"); } JobMaster( RpcService rpcService, JobMasterConfiguration jobMasterConfiguration, ResourceID resourceId, Job...
JobMaster extends FencedRpcEndpoint<JobMasterId> implements JobMasterGateway { @Override public void start() { throw new UnsupportedOperationException("Should never call start() without leader ID"); } JobMaster( RpcService rpcService, JobMasterConfiguration jobMasterConfiguration, ResourceID resourceId, Job...
JobMaster extends FencedRpcEndpoint<JobMasterId> implements JobMasterGateway { @Override public void start() { throw new UnsupportedOperationException("Should never call start() without leader ID"); } JobMaster( RpcService rpcService, JobMasterConfiguration jobMasterConfiguration, ResourceID resourceId, Job...
@Test public void testSlotContextFutureCompletion() throws Exception { final TestingAllocatedSlotActions allocatedSlotActions = new TestingAllocatedSlotActions(); final SlotSharingManager slotSharingManager = new SlotSharingManager( SLOT_SHARING_GROUP_ID, allocatedSlotActions, SLOT_OWNER); final SlotContext slotContext...
MultiTaskSlot createRootSlot( SlotRequestId slotRequestId, CompletableFuture<? extends SlotContext> slotContextFuture, SlotRequestId allocatedSlotRequestId) { final MultiTaskSlot rootMultiTaskSlot = new MultiTaskSlot( slotRequestId, slotContextFuture, allocatedSlotRequestId); allTaskSlots.put(slotRequestId, rootMultiTa...
SlotSharingManager { MultiTaskSlot createRootSlot( SlotRequestId slotRequestId, CompletableFuture<? extends SlotContext> slotContextFuture, SlotRequestId allocatedSlotRequestId) { final MultiTaskSlot rootMultiTaskSlot = new MultiTaskSlot( slotRequestId, slotContextFuture, allocatedSlotRequestId); allTaskSlots.put(slotR...
SlotSharingManager { MultiTaskSlot createRootSlot( SlotRequestId slotRequestId, CompletableFuture<? extends SlotContext> slotContextFuture, SlotRequestId allocatedSlotRequestId) { final MultiTaskSlot rootMultiTaskSlot = new MultiTaskSlot( slotRequestId, slotContextFuture, allocatedSlotRequestId); allTaskSlots.put(slotR...
SlotSharingManager { MultiTaskSlot createRootSlot( SlotRequestId slotRequestId, CompletableFuture<? extends SlotContext> slotContextFuture, SlotRequestId allocatedSlotRequestId) { final MultiTaskSlot rootMultiTaskSlot = new MultiTaskSlot( slotRequestId, slotContextFuture, allocatedSlotRequestId); allTaskSlots.put(slotR...
SlotSharingManager { MultiTaskSlot createRootSlot( SlotRequestId slotRequestId, CompletableFuture<? extends SlotContext> slotContextFuture, SlotRequestId allocatedSlotRequestId) { final MultiTaskSlot rootMultiTaskSlot = new MultiTaskSlot( slotRequestId, slotContextFuture, allocatedSlotRequestId); allTaskSlots.put(slotR...
@Test public void testOfferSlot() throws Exception { final CompletableFuture<SlotRequest> slotRequestFuture = new CompletableFuture<>(); resourceManagerGateway.setRequestSlotConsumer(slotRequest -> slotRequestFuture.complete(slotRequest)); final SlotPool slotPool = new SlotPool(rpcService, jobId); try { SlotPoolGateway...
@Override public CompletableFuture<Boolean> offerSlot( final TaskManagerLocation taskManagerLocation, final TaskManagerGateway taskManagerGateway, final SlotOffer slotOffer) { validateRunsInMainThread(); final ResourceID resourceID = taskManagerLocation.getResourceID(); final AllocationID allocationID = slotOffer.getAl...
SlotPool extends RpcEndpoint implements SlotPoolGateway, AllocatedSlotActions { @Override public CompletableFuture<Boolean> offerSlot( final TaskManagerLocation taskManagerLocation, final TaskManagerGateway taskManagerGateway, final SlotOffer slotOffer) { validateRunsInMainThread(); final ResourceID resourceID = taskMa...
SlotPool extends RpcEndpoint implements SlotPoolGateway, AllocatedSlotActions { @Override public CompletableFuture<Boolean> offerSlot( final TaskManagerLocation taskManagerLocation, final TaskManagerGateway taskManagerGateway, final SlotOffer slotOffer) { validateRunsInMainThread(); final ResourceID resourceID = taskMa...
SlotPool extends RpcEndpoint implements SlotPoolGateway, AllocatedSlotActions { @Override public CompletableFuture<Boolean> offerSlot( final TaskManagerLocation taskManagerLocation, final TaskManagerGateway taskManagerGateway, final SlotOffer slotOffer) { validateRunsInMainThread(); final ResourceID resourceID = taskMa...
SlotPool extends RpcEndpoint implements SlotPoolGateway, AllocatedSlotActions { @Override public CompletableFuture<Boolean> offerSlot( final TaskManagerLocation taskManagerLocation, final TaskManagerGateway taskManagerGateway, final SlotOffer slotOffer) { validateRunsInMainThread(); final ResourceID resourceID = taskMa...
@Test public void testSlotRequestCancellationUponFailingRequest() throws Exception { final SlotPool slotPool = new SlotPool(rpcService, jobId); final CompletableFuture<Acknowledge> requestSlotFuture = new CompletableFuture<>(); final CompletableFuture<AllocationID> cancelSlotFuture = new CompletableFuture<>(); final Co...
@Override public CompletableFuture<LogicalSlot> allocateSlot( SlotRequestId slotRequestId, ScheduledUnit task, SlotProfile slotProfile, boolean allowQueuedScheduling, Time allocationTimeout) { log.debug("Allocating slot with request {} for task execution {}", slotRequestId, task.getTaskToExecute()); final SlotSharingGr...
SlotPool extends RpcEndpoint implements SlotPoolGateway, AllocatedSlotActions { @Override public CompletableFuture<LogicalSlot> allocateSlot( SlotRequestId slotRequestId, ScheduledUnit task, SlotProfile slotProfile, boolean allowQueuedScheduling, Time allocationTimeout) { log.debug("Allocating slot with request {} for ...
SlotPool extends RpcEndpoint implements SlotPoolGateway, AllocatedSlotActions { @Override public CompletableFuture<LogicalSlot> allocateSlot( SlotRequestId slotRequestId, ScheduledUnit task, SlotProfile slotProfile, boolean allowQueuedScheduling, Time allocationTimeout) { log.debug("Allocating slot with request {} for ...
SlotPool extends RpcEndpoint implements SlotPoolGateway, AllocatedSlotActions { @Override public CompletableFuture<LogicalSlot> allocateSlot( SlotRequestId slotRequestId, ScheduledUnit task, SlotProfile slotProfile, boolean allowQueuedScheduling, Time allocationTimeout) { log.debug("Allocating slot with request {} for ...
SlotPool extends RpcEndpoint implements SlotPoolGateway, AllocatedSlotActions { @Override public CompletableFuture<LogicalSlot> allocateSlot( SlotRequestId slotRequestId, ScheduledUnit task, SlotProfile slotProfile, boolean allowQueuedScheduling, Time allocationTimeout) { log.debug("Allocating slot with request {} for ...
@Test public void testCheckIdleSlot() throws Exception { final ManualClock clock = new ManualClock(); final SlotPool slotPool = new SlotPool( rpcService, jobId, clock, TestingUtils.infiniteTime(), timeout); try { final BlockingQueue<AllocationID> freedSlots = new ArrayBlockingQueue<>(1); taskManagerGateway.setFreeSlotF...
private void checkIdleSlot() { final long currentRelativeTimeMillis = clock.relativeTimeMillis(); final List<AllocatedSlot> expiredSlots = new ArrayList<>(availableSlots.size()); for (SlotAndTimestamp slotAndTimestamp : availableSlots.availableSlots.values()) { if (currentRelativeTimeMillis - slotAndTimestamp.timestamp...
SlotPool extends RpcEndpoint implements SlotPoolGateway, AllocatedSlotActions { private void checkIdleSlot() { final long currentRelativeTimeMillis = clock.relativeTimeMillis(); final List<AllocatedSlot> expiredSlots = new ArrayList<>(availableSlots.size()); for (SlotAndTimestamp slotAndTimestamp : availableSlots.avail...
SlotPool extends RpcEndpoint implements SlotPoolGateway, AllocatedSlotActions { private void checkIdleSlot() { final long currentRelativeTimeMillis = clock.relativeTimeMillis(); final List<AllocatedSlot> expiredSlots = new ArrayList<>(availableSlots.size()); for (SlotAndTimestamp slotAndTimestamp : availableSlots.avail...
SlotPool extends RpcEndpoint implements SlotPoolGateway, AllocatedSlotActions { private void checkIdleSlot() { final long currentRelativeTimeMillis = clock.relativeTimeMillis(); final List<AllocatedSlot> expiredSlots = new ArrayList<>(availableSlots.size()); for (SlotAndTimestamp slotAndTimestamp : availableSlots.avail...
SlotPool extends RpcEndpoint implements SlotPoolGateway, AllocatedSlotActions { private void checkIdleSlot() { final long currentRelativeTimeMillis = clock.relativeTimeMillis(); final List<AllocatedSlot> expiredSlots = new ArrayList<>(availableSlots.size()); for (SlotAndTimestamp slotAndTimestamp : availableSlots.avail...
@Test public void testJobFinishedByOther() throws Exception { final JobManagerRunner jobManagerRunner = createJobManagerRunner(); try { jobManagerRunner.start(); final CompletableFuture<ArchivedExecutionGraph> resultFuture = jobManagerRunner.getResultFuture(); assertThat(resultFuture.isDone(), is(false)); jobManagerRun...
@Override public void jobFinishedByOther() { resultFuture.completeExceptionally(new JobNotFinishedException(jobGraph.getJobID())); }
JobManagerRunner implements LeaderContender, OnCompletionActions, AutoCloseableAsync { @Override public void jobFinishedByOther() { resultFuture.completeExceptionally(new JobNotFinishedException(jobGraph.getJobID())); } }
JobManagerRunner implements LeaderContender, OnCompletionActions, AutoCloseableAsync { @Override public void jobFinishedByOther() { resultFuture.completeExceptionally(new JobNotFinishedException(jobGraph.getJobID())); } JobManagerRunner( final ResourceID resourceId, final JobGraph jobGraph, final Configuration...
JobManagerRunner implements LeaderContender, OnCompletionActions, AutoCloseableAsync { @Override public void jobFinishedByOther() { resultFuture.completeExceptionally(new JobNotFinishedException(jobGraph.getJobID())); } JobManagerRunner( final ResourceID resourceId, final JobGraph jobGraph, final Configuration...
JobManagerRunner implements LeaderContender, OnCompletionActions, AutoCloseableAsync { @Override public void jobFinishedByOther() { resultFuture.completeExceptionally(new JobNotFinishedException(jobGraph.getJobID())); } JobManagerRunner( final ResourceID resourceId, final JobGraph jobGraph, final Configuration...
@Test public void testLibraryCacheManagerRegistration() throws Exception { final JobManagerRunner jobManagerRunner = createJobManagerRunner(); try { jobManagerRunner.start(); final LibraryCacheManager libraryCacheManager = jobManagerSharedServices.getLibraryCacheManager(); final JobID jobID = jobGraph.getJobID(); asser...
public void start() throws Exception { try { leaderElectionService.start(this); } catch (Exception e) { log.error("Could not start the JobManager because the leader election service did not start.", e); throw new Exception("Could not start the leader election service.", e); } }
JobManagerRunner implements LeaderContender, OnCompletionActions, AutoCloseableAsync { public void start() throws Exception { try { leaderElectionService.start(this); } catch (Exception e) { log.error("Could not start the JobManager because the leader election service did not start.", e); throw new Exception("Could not...
JobManagerRunner implements LeaderContender, OnCompletionActions, AutoCloseableAsync { public void start() throws Exception { try { leaderElectionService.start(this); } catch (Exception e) { log.error("Could not start the JobManager because the leader election service did not start.", e); throw new Exception("Could not...
JobManagerRunner implements LeaderContender, OnCompletionActions, AutoCloseableAsync { public void start() throws Exception { try { leaderElectionService.start(this); } catch (Exception e) { log.error("Could not start the JobManager because the leader election service did not start.", e); throw new Exception("Could not...
JobManagerRunner implements LeaderContender, OnCompletionActions, AutoCloseableAsync { public void start() throws Exception { try { leaderElectionService.start(this); } catch (Exception e) { log.error("Could not start the JobManager because the leader election service did not start.", e); throw new Exception("Could not...
@Test(expected = UnsupportedOperationException.class) public void testUpdate() { List<Long> list = getStateContents(); assertEquals(1L, list.size()); long element = list.get(0); assertEquals(42L, element); listState.add(54L); }
@Override public void update(List<V> values) throws Exception { throw MODIFICATION_ATTEMPT_ERROR; }
ImmutableListState extends ImmutableState implements ListState<V> { @Override public void update(List<V> values) throws Exception { throw MODIFICATION_ATTEMPT_ERROR; } }
ImmutableListState extends ImmutableState implements ListState<V> { @Override public void update(List<V> values) throws Exception { throw MODIFICATION_ATTEMPT_ERROR; } private ImmutableListState(final List<V> state); }
ImmutableListState extends ImmutableState implements ListState<V> { @Override public void update(List<V> values) throws Exception { throw MODIFICATION_ATTEMPT_ERROR; } private ImmutableListState(final List<V> state); @Override Iterable<V> get(); @Override void add(V value); @Override void clear(); static ImmutableList...
ImmutableListState extends ImmutableState implements ListState<V> { @Override public void update(List<V> values) throws Exception { throw MODIFICATION_ATTEMPT_ERROR; } private ImmutableListState(final List<V> state); @Override Iterable<V> get(); @Override void add(V value); @Override void clear(); static ImmutableList...
@Test(expected = UnsupportedOperationException.class) public void testClear() { List<Long> list = getStateContents(); assertEquals(1L, list.size()); long element = list.get(0); assertEquals(42L, element); listState.clear(); }
@Override public void clear() { throw MODIFICATION_ATTEMPT_ERROR; }
ImmutableListState extends ImmutableState implements ListState<V> { @Override public void clear() { throw MODIFICATION_ATTEMPT_ERROR; } }
ImmutableListState extends ImmutableState implements ListState<V> { @Override public void clear() { throw MODIFICATION_ATTEMPT_ERROR; } private ImmutableListState(final List<V> state); }
ImmutableListState extends ImmutableState implements ListState<V> { @Override public void clear() { throw MODIFICATION_ATTEMPT_ERROR; } private ImmutableListState(final List<V> state); @Override Iterable<V> get(); @Override void add(V value); @Override void clear(); static ImmutableListState<V> createState( final L...
ImmutableListState extends ImmutableState implements ListState<V> { @Override public void clear() { throw MODIFICATION_ATTEMPT_ERROR; } private ImmutableListState(final List<V> state); @Override Iterable<V> get(); @Override void add(V value); @Override void clear(); static ImmutableListState<V> createState( final L...
@Test public void testDetachedJobSubmission() throws Exception { final TestBlobServerPortHandler testBlobServerPortHandler = new TestBlobServerPortHandler(); final TestJobSubmitHandler testJobSubmitHandler = new TestJobSubmitHandler(); try (TestRestServerEndpoint ignored = createRestServerEndpoint( testBlobServerPortHa...
@Override public JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader classLoader) throws ProgramInvocationException { log.info("Submitting job {} (detached: {}).", jobGraph.getJobID(), isDetached()); final CompletableFuture<JobSubmissionResult> jobSubmissionFuture = submitJob(jobGraph); if (isDetached()) { try...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader classLoader) throws ProgramInvocationException { log.info("Submitting job {} (detached: {}).", jobGraph.getJobID(), isDetached()); final CompletableFuture<JobSubmissionR...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader classLoader) throws ProgramInvocationException { log.info("Submitting job {} (detached: {}).", jobGraph.getJobID(), isDetached()); final CompletableFuture<JobSubmissionR...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader classLoader) throws ProgramInvocationException { log.info("Submitting job {} (detached: {}).", jobGraph.getJobID(), isDetached()); final CompletableFuture<JobSubmissionR...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader classLoader) throws ProgramInvocationException { log.info("Submitting job {} (detached: {}).", jobGraph.getJobID(), isDetached()); final CompletableFuture<JobSubmissionR...
@Test public void testSubmitJobAndWaitForExecutionResult() throws Exception { final TestJobExecutionResultHandler testJobExecutionResultHandler = new TestJobExecutionResultHandler( new RestHandlerException("should trigger retry", HttpResponseStatus.NOT_FOUND), JobExecutionResultResponseBody.inProgress(), JobExecutionRe...
@Override public JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader classLoader) throws ProgramInvocationException { log.info("Submitting job {} (detached: {}).", jobGraph.getJobID(), isDetached()); final CompletableFuture<JobSubmissionResult> jobSubmissionFuture = submitJob(jobGraph); if (isDetached()) { try...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader classLoader) throws ProgramInvocationException { log.info("Submitting job {} (detached: {}).", jobGraph.getJobID(), isDetached()); final CompletableFuture<JobSubmissionR...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader classLoader) throws ProgramInvocationException { log.info("Submitting job {} (detached: {}).", jobGraph.getJobID(), isDetached()); final CompletableFuture<JobSubmissionR...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader classLoader) throws ProgramInvocationException { log.info("Submitting job {} (detached: {}).", jobGraph.getJobID(), isDetached()); final CompletableFuture<JobSubmissionR...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public JobSubmissionResult submitJob(JobGraph jobGraph, ClassLoader classLoader) throws ProgramInvocationException { log.info("Submitting job {} (detached: {}).", jobGraph.getJobID(), isDetached()); final CompletableFuture<JobSubmissionR...
@Test public void testTriggerSavepoint() throws Exception { final String targetSavepointDirectory = "/tmp"; final String savepointLocationDefaultDir = "/other/savepoint-0d2fb9-8d5e0106041a"; final String savepointLocationRequestedDir = targetSavepointDirectory + "/savepoint-0d2fb9-8d5e0106041a"; final TestSavepointHand...
@Override public CompletableFuture<String> triggerSavepoint( final JobID jobId, final @Nullable String savepointDirectory) throws FlinkException { return triggerSavepoint(jobId, savepointDirectory, false); }
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public CompletableFuture<String> triggerSavepoint( final JobID jobId, final @Nullable String savepointDirectory) throws FlinkException { return triggerSavepoint(jobId, savepointDirectory, false); } }
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public CompletableFuture<String> triggerSavepoint( final JobID jobId, final @Nullable String savepointDirectory) throws FlinkException { return triggerSavepoint(jobId, savepointDirectory, false); } RestClusterClient(Configuration config,...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public CompletableFuture<String> triggerSavepoint( final JobID jobId, final @Nullable String savepointDirectory) throws FlinkException { return triggerSavepoint(jobId, savepointDirectory, false); } RestClusterClient(Configuration config,...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public CompletableFuture<String> triggerSavepoint( final JobID jobId, final @Nullable String savepointDirectory) throws FlinkException { return triggerSavepoint(jobId, savepointDirectory, false); } RestClusterClient(Configuration config,...
@Test public void testDisposeSavepoint() throws Exception { final String savepointPath = "foobar"; final String exceptionMessage = "Test exception."; final FlinkException testException = new FlinkException(exceptionMessage); final TestSavepointDisposalHandlers testSavepointDisposalHandlers = new TestSavepointDisposalHa...
@Override public CompletableFuture<Acknowledge> disposeSavepoint(String savepointPath) { final SavepointDisposalRequest savepointDisposalRequest = new SavepointDisposalRequest(savepointPath); final CompletableFuture<TriggerResponse> savepointDisposalTriggerFuture = sendRequest( SavepointDisposalTriggerHeaders.getInstan...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public CompletableFuture<Acknowledge> disposeSavepoint(String savepointPath) { final SavepointDisposalRequest savepointDisposalRequest = new SavepointDisposalRequest(savepointPath); final CompletableFuture<TriggerResponse> savepointDispo...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public CompletableFuture<Acknowledge> disposeSavepoint(String savepointPath) { final SavepointDisposalRequest savepointDisposalRequest = new SavepointDisposalRequest(savepointPath); final CompletableFuture<TriggerResponse> savepointDispo...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public CompletableFuture<Acknowledge> disposeSavepoint(String savepointPath) { final SavepointDisposalRequest savepointDisposalRequest = new SavepointDisposalRequest(savepointPath); final CompletableFuture<TriggerResponse> savepointDispo...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public CompletableFuture<Acknowledge> disposeSavepoint(String savepointPath) { final SavepointDisposalRequest savepointDisposalRequest = new SavepointDisposalRequest(savepointPath); final CompletableFuture<TriggerResponse> savepointDispo...
@Test public void testListJobs() throws Exception { try (TestRestServerEndpoint ignored = createRestServerEndpoint(new TestListJobsHandler())) { { CompletableFuture<Collection<JobStatusMessage>> jobDetailsFuture = restClusterClient.listJobs(); Collection<JobStatusMessage> jobDetails = jobDetailsFuture.get(); Iterator<J...
@Override public CompletableFuture<Collection<JobStatusMessage>> listJobs() throws Exception { return sendRequest(JobsOverviewHeaders.getInstance()) .thenApply( (multipleJobsDetails) -> multipleJobsDetails .getJobs() .stream() .map(detail -> new JobStatusMessage( detail.getJobId(), detail.getJobName(), detail.getStatus...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public CompletableFuture<Collection<JobStatusMessage>> listJobs() throws Exception { return sendRequest(JobsOverviewHeaders.getInstance()) .thenApply( (multipleJobsDetails) -> multipleJobsDetails .getJobs() .stream() .map(detail -> new J...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public CompletableFuture<Collection<JobStatusMessage>> listJobs() throws Exception { return sendRequest(JobsOverviewHeaders.getInstance()) .thenApply( (multipleJobsDetails) -> multipleJobsDetails .getJobs() .stream() .map(detail -> new J...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public CompletableFuture<Collection<JobStatusMessage>> listJobs() throws Exception { return sendRequest(JobsOverviewHeaders.getInstance()) .thenApply( (multipleJobsDetails) -> multipleJobsDetails .getJobs() .stream() .map(detail -> new J...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public CompletableFuture<Collection<JobStatusMessage>> listJobs() throws Exception { return sendRequest(JobsOverviewHeaders.getInstance()) .thenApply( (multipleJobsDetails) -> multipleJobsDetails .getJobs() .stream() .map(detail -> new J...
@Test public void testGetAccumulators() throws Exception { TestAccumulatorHandler accumulatorHandler = new TestAccumulatorHandler(); try (TestRestServerEndpoint ignored = createRestServerEndpoint(accumulatorHandler)){ JobID id = new JobID(); { Map<String, OptionalFailure<Object>> accumulators = restClusterClient.getAcc...
@Override public Map<String, OptionalFailure<Object>> getAccumulators(final JobID jobID, ClassLoader loader) throws Exception { final JobAccumulatorsHeaders accumulatorsHeaders = JobAccumulatorsHeaders.getInstance(); final JobAccumulatorsMessageParameters accMsgParams = accumulatorsHeaders.getUnresolvedMessageParameter...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public Map<String, OptionalFailure<Object>> getAccumulators(final JobID jobID, ClassLoader loader) throws Exception { final JobAccumulatorsHeaders accumulatorsHeaders = JobAccumulatorsHeaders.getInstance(); final JobAccumulatorsMessagePa...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public Map<String, OptionalFailure<Object>> getAccumulators(final JobID jobID, ClassLoader loader) throws Exception { final JobAccumulatorsHeaders accumulatorsHeaders = JobAccumulatorsHeaders.getInstance(); final JobAccumulatorsMessagePa...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public Map<String, OptionalFailure<Object>> getAccumulators(final JobID jobID, ClassLoader loader) throws Exception { final JobAccumulatorsHeaders accumulatorsHeaders = JobAccumulatorsHeaders.getInstance(); final JobAccumulatorsMessagePa...
RestClusterClient extends ClusterClient<T> implements NewClusterClient { @Override public Map<String, OptionalFailure<Object>> getAccumulators(final JobID jobID, ClassLoader loader) throws Exception { final JobAccumulatorsHeaders accumulatorsHeaders = JobAccumulatorsHeaders.getInstance(); final JobAccumulatorsMessagePa...
@Test public void testMaxSleepTime() { final long sleepTime = new ExponentialWaitStrategy(1, 1).sleepTime(100); assertThat(sleepTime, equalTo(1L)); }
@Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < maxWait ? exponentialSleepTime : maxWait; }
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
@Test public void testExponentialGrowth() { final ExponentialWaitStrategy exponentialWaitStrategy = new ExponentialWaitStrategy(1, 1000); assertThat(exponentialWaitStrategy.sleepTime(3) / exponentialWaitStrategy.sleepTime(2), equalTo(2L)); }
@Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < maxWait ? exponentialSleepTime : maxWait; }
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
@Test public void testMaxAttempts() { final long maxWait = 1000; final ExponentialWaitStrategy exponentialWaitStrategy = new ExponentialWaitStrategy(1, maxWait); assertThat(exponentialWaitStrategy.sleepTime(Long.MAX_VALUE), equalTo(maxWait)); }
@Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < maxWait ? exponentialSleepTime : maxWait; }
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
@Test public void test64Attempts() { final long maxWait = 1000; final ExponentialWaitStrategy exponentialWaitStrategy = new ExponentialWaitStrategy(1, maxWait); assertThat(exponentialWaitStrategy.sleepTime(64), equalTo(maxWait)); }
@Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < maxWait ? exponentialSleepTime : maxWait; }
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
ExponentialWaitStrategy implements WaitStrategy { @Override public long sleepTime(final long attempt) { checkArgument(attempt >= 0, "attempt must not be negative (%d)", attempt); final long exponentialSleepTime = initialWait * Math.round(Math.pow(2, attempt)); return exponentialSleepTime >= 0 && exponentialSleepTime < ...
@Test public void testClusterClientShutdown() throws Exception { Configuration config = new Configuration(); HighAvailabilityServices highAvailabilityServices = mock(HighAvailabilityServices.class); StandaloneClusterClient clusterClient = new StandaloneClusterClient(config, highAvailabilityServices, false); clusterClie...
public void shutdown() throws Exception { synchronized (this) { actorSystemLoader.shutdown(); if (!sharedHaServices && highAvailabilityServices != null) { highAvailabilityServices.close(); } } }
ClusterClient { public void shutdown() throws Exception { synchronized (this) { actorSystemLoader.shutdown(); if (!sharedHaServices && highAvailabilityServices != null) { highAvailabilityServices.close(); } } } }
ClusterClient { public void shutdown() throws Exception { synchronized (this) { actorSystemLoader.shutdown(); if (!sharedHaServices && highAvailabilityServices != null) { highAvailabilityServices.close(); } } } ClusterClient(Configuration flinkConfig); ClusterClient(Configuration flinkConfig, HighAvailabilityServices ...
ClusterClient { public void shutdown() throws Exception { synchronized (this) { actorSystemLoader.shutdown(); if (!sharedHaServices && highAvailabilityServices != null) { highAvailabilityServices.close(); } } } ClusterClient(Configuration flinkConfig); ClusterClient(Configuration flinkConfig, HighAvailabilityServices ...
ClusterClient { public void shutdown() throws Exception { synchronized (this) { actorSystemLoader.shutdown(); if (!sharedHaServices && highAvailabilityServices != null) { highAvailabilityServices.close(); } } } ClusterClient(Configuration flinkConfig); ClusterClient(Configuration flinkConfig, HighAvailabilityServices ...
@Test public void testGetPreviewPlan() { try { PackagedProgram prog = new PackagedProgram(new File(CliFrontendTestUtils.getTestJarPath())); final PrintStream out = System.out; final PrintStream err = System.err; try { System.setOut(new PrintStream(new NullOutputStream())); System.setErr(new PrintStream(new NullOutputSt...
public String getPreviewPlan() throws ProgramInvocationException { Thread.currentThread().setContextClassLoader(this.getUserCodeClassLoader()); List<DataSinkNode> previewPlan; if (isUsingProgramEntryPoint()) { previewPlan = Optimizer.createPreOptimizedPlan(getPlan()); } else if (isUsingInteractiveMode()) { PreviewPlanE...
PackagedProgram { public String getPreviewPlan() throws ProgramInvocationException { Thread.currentThread().setContextClassLoader(this.getUserCodeClassLoader()); List<DataSinkNode> previewPlan; if (isUsingProgramEntryPoint()) { previewPlan = Optimizer.createPreOptimizedPlan(getPlan()); } else if (isUsingInteractiveMode...
PackagedProgram { public String getPreviewPlan() throws ProgramInvocationException { Thread.currentThread().setContextClassLoader(this.getUserCodeClassLoader()); List<DataSinkNode> previewPlan; if (isUsingProgramEntryPoint()) { previewPlan = Optimizer.createPreOptimizedPlan(getPlan()); } else if (isUsingInteractiveMode...
PackagedProgram { public String getPreviewPlan() throws ProgramInvocationException { Thread.currentThread().setContextClassLoader(this.getUserCodeClassLoader()); List<DataSinkNode> previewPlan; if (isUsingProgramEntryPoint()) { previewPlan = Optimizer.createPreOptimizedPlan(getPlan()); } else if (isUsingInteractiveMode...
PackagedProgram { public String getPreviewPlan() throws ProgramInvocationException { Thread.currentThread().setContextClassLoader(this.getUserCodeClassLoader()); List<DataSinkNode> previewPlan; if (isUsingProgramEntryPoint()) { previewPlan = Optimizer.createPreOptimizedPlan(getPlan()); } else if (isUsingInteractiveMode...
@Test public void testInitialize() throws Exception { new Context() {{ startResourceManager(); LOG.info("initialized"); }}; }
@Override protected void initialize() throws ResourceManagerException { try { this.workerStore = mesosServices.createMesosWorkerStore(flinkConfig, getRpcService().getExecutor()); workerStore.start(); } catch (Exception e) { throw new ResourceManagerException("Unable to initialize the worker store.", e); } Protos.Framew...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { @Override protected void initialize() throws ResourceManagerException { try { this.workerStore = mesosServices.createMesosWorkerStore(flinkConfig, getRpcService().getExecutor()); workerStore.start(); } catch (Exception e) { throw new ResourceMana...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { @Override protected void initialize() throws ResourceManagerException { try { this.workerStore = mesosServices.createMesosWorkerStore(flinkConfig, getRpcService().getExecutor()); workerStore.start(); } catch (Exception e) { throw new ResourceMana...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { @Override protected void initialize() throws ResourceManagerException { try { this.workerStore = mesosServices.createMesosWorkerStore(flinkConfig, getRpcService().getExecutor()); workerStore.start(); } catch (Exception e) { throw new ResourceMana...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { @Override protected void initialize() throws ResourceManagerException { try { this.workerStore = mesosServices.createMesosWorkerStore(flinkConfig, getRpcService().getExecutor()); workerStore.start(); } catch (Exception e) { throw new ResourceMana...
@Test public void testRecoverWorkers() throws Exception { new Context() {{ MesosWorkerStore.Worker worker1 = MesosWorkerStore.Worker.newWorker(task1); MesosWorkerStore.Worker worker2 = MesosWorkerStore.Worker.newWorker(task2).launchWorker(slave1, slave1host); MesosWorkerStore.Worker worker3 = MesosWorkerStore.Worker.ne...
private void recoverWorkers() throws Exception { final List<MesosWorkerStore.Worker> tasksFromPreviousAttempts = workerStore.recoverWorkers(); assert(workersInNew.isEmpty()); assert(workersInLaunch.isEmpty()); assert(workersBeingReturned.isEmpty()); if (!tasksFromPreviousAttempts.isEmpty()) { LOG.info("Retrieved {} Tas...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { private void recoverWorkers() throws Exception { final List<MesosWorkerStore.Worker> tasksFromPreviousAttempts = workerStore.recoverWorkers(); assert(workersInNew.isEmpty()); assert(workersInLaunch.isEmpty()); assert(workersBeingReturned.isEmpty(...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { private void recoverWorkers() throws Exception { final List<MesosWorkerStore.Worker> tasksFromPreviousAttempts = workerStore.recoverWorkers(); assert(workersInNew.isEmpty()); assert(workersInLaunch.isEmpty()); assert(workersBeingReturned.isEmpty(...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { private void recoverWorkers() throws Exception { final List<MesosWorkerStore.Worker> tasksFromPreviousAttempts = workerStore.recoverWorkers(); assert(workersInNew.isEmpty()); assert(workersInLaunch.isEmpty()); assert(workersBeingReturned.isEmpty(...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { private void recoverWorkers() throws Exception { final List<MesosWorkerStore.Worker> tasksFromPreviousAttempts = workerStore.recoverWorkers(); assert(workersInNew.isEmpty()); assert(workersInLaunch.isEmpty()); assert(workersBeingReturned.isEmpty(...
@Test public void testRequestNewWorkers() throws Exception { new Context() {{ startResourceManager(); when(rmServices.workerStore.newTaskID()).thenReturn(task1).thenThrow(new AssertionFailedError()); rmServices.slotManagerStarted.get(timeout.toMilliseconds(), TimeUnit.MILLISECONDS); CompletableFuture<Void> allocateReso...
static ResourceID extractResourceID(Protos.TaskID taskId) { return new ResourceID(taskId.getValue()); }
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { static ResourceID extractResourceID(Protos.TaskID taskId) { return new ResourceID(taskId.getValue()); } }
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { static ResourceID extractResourceID(Protos.TaskID taskId) { return new ResourceID(taskId.getValue()); } MesosResourceManager( // base class RpcService rpcService, String resourceManagerEndpointId, ResourceID resourceId, ResourceMan...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { static ResourceID extractResourceID(Protos.TaskID taskId) { return new ResourceID(taskId.getValue()); } MesosResourceManager( // base class RpcService rpcService, String resourceManagerEndpointId, ResourceID resourceId, ResourceMan...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { static ResourceID extractResourceID(Protos.TaskID taskId) { return new ResourceID(taskId.getValue()); } MesosResourceManager( // base class RpcService rpcService, String resourceManagerEndpointId, ResourceID resourceId, ResourceMan...
@Test public void testAcceptOffers() throws Exception { new Context() {{ startResourceManager(); MesosWorkerStore.Worker worker1 = allocateWorker(task1, resourceProfile1); Protos.TaskInfo task1info = Protos.TaskInfo.newBuilder() .setTaskId(task1).setName("").setSlaveId(slave1).build(); AcceptOffers msg = new AcceptOffe...
public void acceptOffers(AcceptOffers msg) { try { List<TaskMonitor.TaskGoalStateUpdated> toMonitor = new ArrayList<>(msg.operations().size()); for (Protos.Offer.Operation op : msg.operations()) { if (op.getType() == Protos.Offer.Operation.Type.LAUNCH) { for (Protos.TaskInfo info : op.getLaunch().getTaskInfosList()) { ...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { public void acceptOffers(AcceptOffers msg) { try { List<TaskMonitor.TaskGoalStateUpdated> toMonitor = new ArrayList<>(msg.operations().size()); for (Protos.Offer.Operation op : msg.operations()) { if (op.getType() == Protos.Offer.Operation.Type.L...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { public void acceptOffers(AcceptOffers msg) { try { List<TaskMonitor.TaskGoalStateUpdated> toMonitor = new ArrayList<>(msg.operations().size()); for (Protos.Offer.Operation op : msg.operations()) { if (op.getType() == Protos.Offer.Operation.Type.L...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { public void acceptOffers(AcceptOffers msg) { try { List<TaskMonitor.TaskGoalStateUpdated> toMonitor = new ArrayList<>(msg.operations().size()); for (Protos.Offer.Operation op : msg.operations()) { if (op.getType() == Protos.Offer.Operation.Type.L...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { public void acceptOffers(AcceptOffers msg) { try { List<TaskMonitor.TaskGoalStateUpdated> toMonitor = new ArrayList<>(msg.operations().size()); for (Protos.Offer.Operation op : msg.operations()) { if (op.getType() == Protos.Offer.Operation.Type.L...
@Test public void testStatusHandling() throws Exception { new Context() {{ startResourceManager(); resourceManager.statusUpdate(new StatusUpdate(Protos.TaskStatus.newBuilder() .setTaskId(task1).setSlaveId(slave1).setState(Protos.TaskState.TASK_LOST).build())); resourceManager.reconciliationCoordinator.expectMsgClass(St...
protected void statusUpdate(StatusUpdate message) { taskMonitor.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); schedulerDriver.acknowledgeStatusUpdate(message.status()); }
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void statusUpdate(StatusUpdate message) { taskMonitor.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); schedulerDriver.acknowledgeStatusUpdate(message.status()); } }
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void statusUpdate(StatusUpdate message) { taskMonitor.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); schedulerDriver.acknowledgeStatusUpdate(message.status()); } MesosResourceManager( // base class R...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void statusUpdate(StatusUpdate message) { taskMonitor.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); schedulerDriver.acknowledgeStatusUpdate(message.status()); } MesosResourceManager( // base class R...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void statusUpdate(StatusUpdate message) { taskMonitor.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); schedulerDriver.acknowledgeStatusUpdate(message.status()); } MesosResourceManager( // base class R...
@Test public void testWorkerStarted() throws Exception { new Context() {{ MesosWorkerStore.Worker worker1launched = MesosWorkerStore.Worker.newWorker(task1).launchWorker(slave1, slave1host); when(rmServices.workerStore.getFrameworkID()).thenReturn(Option.apply(framework1)); when(rmServices.workerStore.recoverWorkers())...
@Override protected RegisteredMesosWorkerNode workerStarted(ResourceID resourceID) { MesosWorkerStore.Worker inLaunch = workersInLaunch.get(resourceID); if (inLaunch != null) { return new RegisteredMesosWorkerNode(inLaunch); } else { return null; } }
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { @Override protected RegisteredMesosWorkerNode workerStarted(ResourceID resourceID) { MesosWorkerStore.Worker inLaunch = workersInLaunch.get(resourceID); if (inLaunch != null) { return new RegisteredMesosWorkerNode(inLaunch); } else { return null;...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { @Override protected RegisteredMesosWorkerNode workerStarted(ResourceID resourceID) { MesosWorkerStore.Worker inLaunch = workersInLaunch.get(resourceID); if (inLaunch != null) { return new RegisteredMesosWorkerNode(inLaunch); } else { return null;...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { @Override protected RegisteredMesosWorkerNode workerStarted(ResourceID resourceID) { MesosWorkerStore.Worker inLaunch = workersInLaunch.get(resourceID); if (inLaunch != null) { return new RegisteredMesosWorkerNode(inLaunch); } else { return null;...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { @Override protected RegisteredMesosWorkerNode workerStarted(ResourceID resourceID) { MesosWorkerStore.Worker inLaunch = workersInLaunch.get(resourceID); if (inLaunch != null) { return new RegisteredMesosWorkerNode(inLaunch); } else { return null;...
@Test public void testStopWorker() throws Exception { new Context() {{ MesosWorkerStore.Worker worker1launched = MesosWorkerStore.Worker.newWorker(task1).launchWorker(slave1, slave1host); when(rmServices.workerStore.getFrameworkID()).thenReturn(Option.apply(framework1)); when(rmServices.workerStore.recoverWorkers()).th...
@Override public boolean stopWorker(RegisteredMesosWorkerNode workerNode) { LOG.info("Stopping worker {}.", workerNode.getResourceID()); try { if (workersInLaunch.containsKey(workerNode.getResourceID())) { MesosWorkerStore.Worker worker = workersInLaunch.remove(workerNode.getResourceID()); worker = worker.releaseWorker...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { @Override public boolean stopWorker(RegisteredMesosWorkerNode workerNode) { LOG.info("Stopping worker {}.", workerNode.getResourceID()); try { if (workersInLaunch.containsKey(workerNode.getResourceID())) { MesosWorkerStore.Worker worker = workers...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { @Override public boolean stopWorker(RegisteredMesosWorkerNode workerNode) { LOG.info("Stopping worker {}.", workerNode.getResourceID()); try { if (workersInLaunch.containsKey(workerNode.getResourceID())) { MesosWorkerStore.Worker worker = workers...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { @Override public boolean stopWorker(RegisteredMesosWorkerNode workerNode) { LOG.info("Stopping worker {}.", workerNode.getResourceID()); try { if (workersInLaunch.containsKey(workerNode.getResourceID())) { MesosWorkerStore.Worker worker = workers...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { @Override public boolean stopWorker(RegisteredMesosWorkerNode workerNode) { LOG.info("Stopping worker {}.", workerNode.getResourceID()); try { if (workersInLaunch.containsKey(workerNode.getResourceID())) { MesosWorkerStore.Worker worker = workers...
@Test public void testRegistered() throws Exception { new Context() {{ startResourceManager(); Protos.MasterInfo masterInfo = Protos.MasterInfo.newBuilder() .setId("master1").setIp(0).setPort(5050).build(); resourceManager.registered(new Registered(framework1, masterInfo)); verify(rmServices.workerStore).setFrameworkID...
protected void registered(Registered message) { connectionMonitor.tell(message, selfActor); try { workerStore.setFrameworkID(Option.apply(message.frameworkId())); } catch (Exception ex) { onFatalError(new ResourceManagerException("Unable to store the assigned framework ID.", ex)); return; } launchCoordinator.tell(messa...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void registered(Registered message) { connectionMonitor.tell(message, selfActor); try { workerStore.setFrameworkID(Option.apply(message.frameworkId())); } catch (Exception ex) { onFatalError(new ResourceManagerException("Unable to store...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void registered(Registered message) { connectionMonitor.tell(message, selfActor); try { workerStore.setFrameworkID(Option.apply(message.frameworkId())); } catch (Exception ex) { onFatalError(new ResourceManagerException("Unable to store...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void registered(Registered message) { connectionMonitor.tell(message, selfActor); try { workerStore.setFrameworkID(Option.apply(message.frameworkId())); } catch (Exception ex) { onFatalError(new ResourceManagerException("Unable to store...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void registered(Registered message) { connectionMonitor.tell(message, selfActor); try { workerStore.setFrameworkID(Option.apply(message.frameworkId())); } catch (Exception ex) { onFatalError(new ResourceManagerException("Unable to store...
@Test public void testReRegistered() throws Exception { new Context() {{ when(rmServices.workerStore.getFrameworkID()).thenReturn(Option.apply(framework1)); startResourceManager(); Protos.MasterInfo masterInfo = Protos.MasterInfo.newBuilder() .setId("master1").setIp(0).setPort(5050).build(); resourceManager.reregistere...
protected void reregistered(ReRegistered message) { connectionMonitor.tell(message, selfActor); launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); }
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void reregistered(ReRegistered message) { connectionMonitor.tell(message, selfActor); launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); } }
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void reregistered(ReRegistered message) { connectionMonitor.tell(message, selfActor); launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); } MesosResourceM...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void reregistered(ReRegistered message) { connectionMonitor.tell(message, selfActor); launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); } MesosResourceM...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void reregistered(ReRegistered message) { connectionMonitor.tell(message, selfActor); launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); } MesosResourceM...
@Test public void testDisconnected() throws Exception { new Context() {{ when(rmServices.workerStore.getFrameworkID()).thenReturn(Option.apply(framework1)); startResourceManager(); resourceManager.disconnected(new Disconnected()); resourceManager.connectionMonitor.expectMsgClass(Disconnected.class); resourceManager.rec...
protected void disconnected(Disconnected message) { connectionMonitor.tell(message, selfActor); launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); }
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void disconnected(Disconnected message) { connectionMonitor.tell(message, selfActor); launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); } }
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void disconnected(Disconnected message) { connectionMonitor.tell(message, selfActor); launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); } MesosResourceM...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void disconnected(Disconnected message) { connectionMonitor.tell(message, selfActor); launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); } MesosResourceM...
MesosResourceManager extends ResourceManager<RegisteredMesosWorkerNode> { protected void disconnected(Disconnected message) { connectionMonitor.tell(message, selfActor); launchCoordinator.tell(message, selfActor); reconciliationCoordinator.tell(message, selfActor); taskMonitor.tell(message, selfActor); } MesosResourceM...
@Test public void testBuildVolumes() throws Exception { List<Protos.Volume> vols; assertEquals(MesosTaskManagerParameters.buildVolumes(Option.<String>apply(null)).size(), 0); String spec1 = "/host/path:/container/path:RO,/container/path:ro,/host/path:/container/path,/container/path"; vols = MesosTaskManagerParameters.b...
public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications.length); for (String volumeSp...
MesosTaskManagerParameters { public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications....
MesosTaskManagerParameters { public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications....
MesosTaskManagerParameters { public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications....
MesosTaskManagerParameters { public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications....
@Test(expected = IllegalArgumentException.class) public void testBuildVolumesBadMode() throws Exception { MesosTaskManagerParameters.buildVolumes(Option.<String>apply("/hp:/cp:RF")); }
public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications.length); for (String volumeSp...
MesosTaskManagerParameters { public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications....
MesosTaskManagerParameters { public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications....
MesosTaskManagerParameters { public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications....
MesosTaskManagerParameters { public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications....
@Test(expected = IllegalArgumentException.class) public void testBuildVolumesMalformed() throws Exception { MesosTaskManagerParameters.buildVolumes(Option.<String>apply("/hp:/cp:ro:extra")); }
public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications.length); for (String volumeSp...
MesosTaskManagerParameters { public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications....
MesosTaskManagerParameters { public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications....
MesosTaskManagerParameters { public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications....
MesosTaskManagerParameters { public static List<Protos.Volume> buildVolumes(Option<String> containerVolumes) { if (containerVolumes.isEmpty()) { return Collections.emptyList(); } else { String[] volumeSpecifications = containerVolumes.get().split(","); List<Protos.Volume> volumes = new ArrayList<>(volumeSpecifications....
@Test public void testContainerVolumes() throws Exception { Configuration config = new Configuration(); config.setString(MesosTaskManagerParameters.MESOS_RM_CONTAINER_VOLUMES, "/host/path:/container/path:ro"); MesosTaskManagerParameters params = MesosTaskManagerParameters.create(config); assertEquals(1, params.containe...
public List<Protos.Volume> containerVolumes() { return containerVolumes; }
MesosTaskManagerParameters { public List<Protos.Volume> containerVolumes() { return containerVolumes; } }
MesosTaskManagerParameters { public List<Protos.Volume> containerVolumes() { return containerVolumes; } MesosTaskManagerParameters( double cpus, int gpus, ContainerType containerType, Option<String> containerImageName, ContaineredTaskManagerParameters containeredParameters, List<Protos.Volume> contain...
MesosTaskManagerParameters { public List<Protos.Volume> containerVolumes() { return containerVolumes; } MesosTaskManagerParameters( double cpus, int gpus, ContainerType containerType, Option<String> containerImageName, ContaineredTaskManagerParameters containeredParameters, List<Protos.Volume> contain...
MesosTaskManagerParameters { public List<Protos.Volume> containerVolumes() { return containerVolumes; } MesosTaskManagerParameters( double cpus, int gpus, ContainerType containerType, Option<String> containerImageName, ContaineredTaskManagerParameters containeredParameters, List<Protos.Volume> contain...
@Test(expected = IllegalArgumentException.class) public void testContainerDockerParametersMalformed() throws Exception { Configuration config = new Configuration(); config.setString(MesosTaskManagerParameters.MESOS_RM_CONTAINER_DOCKER_PARAMETERS, "badParam"); MesosTaskManagerParameters params = MesosTaskManagerParamete...
public static MesosTaskManagerParameters create(Configuration flinkConfig) { List<ConstraintEvaluator> constraints = parseConstraints(flinkConfig.getString(MESOS_CONSTRAINTS_HARD_HOSTATTR)); ContaineredTaskManagerParameters containeredParameters = ContaineredTaskManagerParameters.create( flinkConfig, flinkConfig.getInt...
MesosTaskManagerParameters { public static MesosTaskManagerParameters create(Configuration flinkConfig) { List<ConstraintEvaluator> constraints = parseConstraints(flinkConfig.getString(MESOS_CONSTRAINTS_HARD_HOSTATTR)); ContaineredTaskManagerParameters containeredParameters = ContaineredTaskManagerParameters.create( fl...
MesosTaskManagerParameters { public static MesosTaskManagerParameters create(Configuration flinkConfig) { List<ConstraintEvaluator> constraints = parseConstraints(flinkConfig.getString(MESOS_CONSTRAINTS_HARD_HOSTATTR)); ContaineredTaskManagerParameters containeredParameters = ContaineredTaskManagerParameters.create( fl...
MesosTaskManagerParameters { public static MesosTaskManagerParameters create(Configuration flinkConfig) { List<ConstraintEvaluator> constraints = parseConstraints(flinkConfig.getString(MESOS_CONSTRAINTS_HARD_HOSTATTR)); ContaineredTaskManagerParameters containeredParameters = ContaineredTaskManagerParameters.create( fl...
MesosTaskManagerParameters { public static MesosTaskManagerParameters create(Configuration flinkConfig) { List<ConstraintEvaluator> constraints = parseConstraints(flinkConfig.getString(MESOS_CONSTRAINTS_HARD_HOSTATTR)); ContaineredTaskManagerParameters containeredParameters = ContaineredTaskManagerParameters.create( fl...
@Test(expected = IllegalConfigurationException.class) public void testNegativeNumberOfGPUs() throws Exception { MesosTaskManagerParameters.create(withGPUConfiguration(-1)); }
public static MesosTaskManagerParameters create(Configuration flinkConfig) { List<ConstraintEvaluator> constraints = parseConstraints(flinkConfig.getString(MESOS_CONSTRAINTS_HARD_HOSTATTR)); ContaineredTaskManagerParameters containeredParameters = ContaineredTaskManagerParameters.create( flinkConfig, flinkConfig.getInt...
MesosTaskManagerParameters { public static MesosTaskManagerParameters create(Configuration flinkConfig) { List<ConstraintEvaluator> constraints = parseConstraints(flinkConfig.getString(MESOS_CONSTRAINTS_HARD_HOSTATTR)); ContaineredTaskManagerParameters containeredParameters = ContaineredTaskManagerParameters.create( fl...
MesosTaskManagerParameters { public static MesosTaskManagerParameters create(Configuration flinkConfig) { List<ConstraintEvaluator> constraints = parseConstraints(flinkConfig.getString(MESOS_CONSTRAINTS_HARD_HOSTATTR)); ContaineredTaskManagerParameters containeredParameters = ContaineredTaskManagerParameters.create( fl...
MesosTaskManagerParameters { public static MesosTaskManagerParameters create(Configuration flinkConfig) { List<ConstraintEvaluator> constraints = parseConstraints(flinkConfig.getString(MESOS_CONSTRAINTS_HARD_HOSTATTR)); ContaineredTaskManagerParameters containeredParameters = ContaineredTaskManagerParameters.create( fl...
MesosTaskManagerParameters { public static MesosTaskManagerParameters create(Configuration flinkConfig) { List<ConstraintEvaluator> constraints = parseConstraints(flinkConfig.getString(MESOS_CONSTRAINTS_HARD_HOSTATTR)); ContaineredTaskManagerParameters containeredParameters = ContaineredTaskManagerParameters.create( fl...
@Test public void testCpuCores() { Offer offer = new Offer(offer(resources(cpus(1.0)), attrs())); Assert.assertEquals(1.0, offer.cpuCores(), EPSILON); }
@Override public double cpuCores() { return cpuCores; }
Offer implements VirtualMachineLease { @Override public double cpuCores() { return cpuCores; } }
Offer implements VirtualMachineLease { @Override public double cpuCores() { return cpuCores; } Offer(Protos.Offer offer); }
Offer implements VirtualMachineLease { @Override public double cpuCores() { return cpuCores; } Offer(Protos.Offer offer); List<Protos.Resource> getResources(); @Override String hostname(); @Override String getVMID(); @Override double cpuCores(); double gpus(); @Override double memoryMB(); @Override double networkMbps()...
Offer implements VirtualMachineLease { @Override public double cpuCores() { return cpuCores; } Offer(Protos.Offer offer); List<Protos.Resource> getResources(); @Override String hostname(); @Override String getVMID(); @Override double cpuCores(); double gpus(); @Override double memoryMB(); @Override double networkMbps()...
@Test public void testGPUs() { Offer offer = new Offer(offer(resources(gpus(1.0)), attrs())); Assert.assertEquals(1.0, offer.gpus(), EPSILON); }
public double gpus() { return getScalarValue("gpus"); }
Offer implements VirtualMachineLease { public double gpus() { return getScalarValue("gpus"); } }
Offer implements VirtualMachineLease { public double gpus() { return getScalarValue("gpus"); } Offer(Protos.Offer offer); }
Offer implements VirtualMachineLease { public double gpus() { return getScalarValue("gpus"); } Offer(Protos.Offer offer); List<Protos.Resource> getResources(); @Override String hostname(); @Override String getVMID(); @Override double cpuCores(); double gpus(); @Override double memoryMB(); @Override double networkMbps()...
Offer implements VirtualMachineLease { public double gpus() { return getScalarValue("gpus"); } Offer(Protos.Offer offer); List<Protos.Resource> getResources(); @Override String hostname(); @Override String getVMID(); @Override double cpuCores(); double gpus(); @Override double memoryMB(); @Override double networkMbps()...
@Test public void testMemoryMB() { Offer offer = new Offer(offer(resources(mem(1024.0)), attrs())); Assert.assertEquals(1024.0, offer.memoryMB(), EPSILON); }
@Override public double memoryMB() { return memoryMB; }
Offer implements VirtualMachineLease { @Override public double memoryMB() { return memoryMB; } }
Offer implements VirtualMachineLease { @Override public double memoryMB() { return memoryMB; } Offer(Protos.Offer offer); }
Offer implements VirtualMachineLease { @Override public double memoryMB() { return memoryMB; } Offer(Protos.Offer offer); List<Protos.Resource> getResources(); @Override String hostname(); @Override String getVMID(); @Override double cpuCores(); double gpus(); @Override double memoryMB(); @Override double networkMbps()...
Offer implements VirtualMachineLease { @Override public double memoryMB() { return memoryMB; } Offer(Protos.Offer offer); List<Protos.Resource> getResources(); @Override String hostname(); @Override String getVMID(); @Override double cpuCores(); double gpus(); @Override double memoryMB(); @Override double networkMbps()...
@Test public void testNetworkMbps() { Offer offer = new Offer(offer(resources(network(10.0)), attrs())); Assert.assertEquals(10.0, offer.networkMbps(), EPSILON); }
@Override public double networkMbps() { return networkMbps; }
Offer implements VirtualMachineLease { @Override public double networkMbps() { return networkMbps; } }
Offer implements VirtualMachineLease { @Override public double networkMbps() { return networkMbps; } Offer(Protos.Offer offer); }
Offer implements VirtualMachineLease { @Override public double networkMbps() { return networkMbps; } Offer(Protos.Offer offer); List<Protos.Resource> getResources(); @Override String hostname(); @Override String getVMID(); @Override double cpuCores(); double gpus(); @Override double memoryMB(); @Override double network...
Offer implements VirtualMachineLease { @Override public double networkMbps() { return networkMbps; } Offer(Protos.Offer offer); List<Protos.Resource> getResources(); @Override String hostname(); @Override String getVMID(); @Override double cpuCores(); double gpus(); @Override double memoryMB(); @Override double network...
@Test public void testDiskMB() { Offer offer = new Offer(offer(resources(disk(1024.0)), attrs())); Assert.assertEquals(1024.0, offer.diskMB(), EPSILON); }
@Override public double diskMB() { return diskMB; }
Offer implements VirtualMachineLease { @Override public double diskMB() { return diskMB; } }
Offer implements VirtualMachineLease { @Override public double diskMB() { return diskMB; } Offer(Protos.Offer offer); }
Offer implements VirtualMachineLease { @Override public double diskMB() { return diskMB; } Offer(Protos.Offer offer); List<Protos.Resource> getResources(); @Override String hostname(); @Override String getVMID(); @Override double cpuCores(); double gpus(); @Override double memoryMB(); @Override double networkMbps(); @O...
Offer implements VirtualMachineLease { @Override public double diskMB() { return diskMB; } Offer(Protos.Offer offer); List<Protos.Resource> getResources(); @Override String hostname(); @Override String getVMID(); @Override double cpuCores(); double gpus(); @Override double memoryMB(); @Override double networkMbps(); @O...
@Test public void testPortRanges() { Offer offer = new Offer(offer(resources(ports(range(8080, 8081))), attrs())); Assert.assertEquals(Collections.singletonList(range(8080, 8081)), ranges(offer.portRanges())); }
@Override public List<Range> portRanges() { return portRanges; }
Offer implements VirtualMachineLease { @Override public List<Range> portRanges() { return portRanges; } }
Offer implements VirtualMachineLease { @Override public List<Range> portRanges() { return portRanges; } Offer(Protos.Offer offer); }
Offer implements VirtualMachineLease { @Override public List<Range> portRanges() { return portRanges; } Offer(Protos.Offer offer); List<Protos.Resource> getResources(); @Override String hostname(); @Override String getVMID(); @Override double cpuCores(); double gpus(); @Override double memoryMB(); @Override double netw...
Offer implements VirtualMachineLease { @Override public List<Range> portRanges() { return portRanges; } Offer(Protos.Offer offer); List<Protos.Resource> getResources(); @Override String hostname(); @Override String getVMID(); @Override double cpuCores(); double gpus(); @Override double memoryMB(); @Override double netw...
@Test public void testSharedBuffer() { SharedBuffer<String, Event> sharedBuffer = new SharedBuffer<>(); int numberEvents = 8; Event[] events = new Event[numberEvents]; final long timestamp = 1L; for (int i = 0; i < numberEvents; i++) { events[i] = new Event(i + 1, "e" + (i + 1), i); } Map<String, List<Event>> expectedP...
public SharedBuffer() { this.pages = new HashMap<>(4); }
SharedBuffer implements Serializable { public SharedBuffer() { this.pages = new HashMap<>(4); } }
SharedBuffer implements Serializable { public SharedBuffer() { this.pages = new HashMap<>(4); } SharedBuffer(); private SharedBuffer(Map<K, SharedBufferPage<K, V>> pages); }
SharedBuffer implements Serializable { public SharedBuffer() { this.pages = new HashMap<>(4); } SharedBuffer(); private SharedBuffer(Map<K, SharedBufferPage<K, V>> pages); int put( final K key, final V value, final long timestamp, final K previousKey, final V previousValue, final long previousTimesta...
SharedBuffer implements Serializable { public SharedBuffer() { this.pages = new HashMap<>(4); } SharedBuffer(); private SharedBuffer(Map<K, SharedBufferPage<K, V>> pages); int put( final K key, final V value, final long timestamp, final K previousKey, final V previousValue, final long previousTimesta...
@Test public void testSharedBufferSerialization() throws IOException, ClassNotFoundException { SharedBuffer<String, Event> sharedBuffer = new SharedBuffer<>(); int numberEvents = 8; Event[] events = new Event[numberEvents]; final long timestamp = 1L; for (int i = 0; i < numberEvents; i++) { events[i] = new Event(i + 1,...
public int put( final K key, final V value, final long timestamp, final K previousKey, final V previousValue, final long previousTimestamp, final int previousCounter, final DeweyNumber version) { final SharedBufferEntry<K, V> previousSharedBufferEntry = get(previousKey, previousValue, previousTimestamp, previousCounter...
SharedBuffer implements Serializable { public int put( final K key, final V value, final long timestamp, final K previousKey, final V previousValue, final long previousTimestamp, final int previousCounter, final DeweyNumber version) { final SharedBufferEntry<K, V> previousSharedBufferEntry = get(previousKey, previousVa...
SharedBuffer implements Serializable { public int put( final K key, final V value, final long timestamp, final K previousKey, final V previousValue, final long previousTimestamp, final int previousCounter, final DeweyNumber version) { final SharedBufferEntry<K, V> previousSharedBufferEntry = get(previousKey, previousVa...
SharedBuffer implements Serializable { public int put( final K key, final V value, final long timestamp, final K previousKey, final V previousValue, final long previousTimestamp, final int previousCounter, final DeweyNumber version) { final SharedBufferEntry<K, V> previousSharedBufferEntry = get(previousKey, previousVa...
SharedBuffer implements Serializable { public int put( final K key, final V value, final long timestamp, final K previousKey, final V previousValue, final long previousTimestamp, final int previousCounter, final DeweyNumber version) { final SharedBufferEntry<K, V> previousSharedBufferEntry = get(previousKey, previousVa...
@Test public void testKerberosKeytabConfiguration() throws IOException { final String resourceDirPath = Paths.get("src", "test", "resources").toAbsolutePath().toString(); final Map<String, String> envs = new HashMap<>(); envs.put(YarnFlinkResourceManager.ENV_FLINK_CONTAINER_ID, "test_container_00001"); envs.put(YarnCon...
public static Runner create( String[] args, final Class<? extends YarnTaskManager> taskManager, Map<String, String> envs) throws IOException { EnvironmentInformation.logEnvironmentInfo(LOG, "YARN TaskManager", args); SignalHandler.register(LOG); JvmShutdownSafeguard.installAsShutdownHook(LOG); final Configuration confi...
YarnTaskManagerRunnerFactory { public static Runner create( String[] args, final Class<? extends YarnTaskManager> taskManager, Map<String, String> envs) throws IOException { EnvironmentInformation.logEnvironmentInfo(LOG, "YARN TaskManager", args); SignalHandler.register(LOG); JvmShutdownSafeguard.installAsShutdownHook(...
YarnTaskManagerRunnerFactory { public static Runner create( String[] args, final Class<? extends YarnTaskManager> taskManager, Map<String, String> envs) throws IOException { EnvironmentInformation.logEnvironmentInfo(LOG, "YARN TaskManager", args); SignalHandler.register(LOG); JvmShutdownSafeguard.installAsShutdownHook(...
YarnTaskManagerRunnerFactory { public static Runner create( String[] args, final Class<? extends YarnTaskManager> taskManager, Map<String, String> envs) throws IOException { EnvironmentInformation.logEnvironmentInfo(LOG, "YARN TaskManager", args); SignalHandler.register(LOG); JvmShutdownSafeguard.installAsShutdownHook(...
YarnTaskManagerRunnerFactory { public static Runner create( String[] args, final Class<? extends YarnTaskManager> taskManager, Map<String, String> envs) throws IOException { EnvironmentInformation.logEnvironmentInfo(LOG, "YARN TaskManager", args); SignalHandler.register(LOG); JvmShutdownSafeguard.installAsShutdownHook(...
@Test public void testCallsMethodIfPresent() { final RegisterApplicationMasterResponseReflector registerApplicationMasterResponseReflector = new RegisterApplicationMasterResponseReflector(LOG, HasMethod.class); final List<Container> containersFromPreviousAttemptsUnsafe = registerApplicationMasterResponseReflector.getCo...
@VisibleForTesting List<Container> getContainersFromPreviousAttemptsUnsafe(final Object response) { if (method != null && response != null) { try { @SuppressWarnings("unchecked") final List<Container> containers = (List<Container>) method.invoke(response); if (containers != null && !containers.isEmpty()) { return conta...
RegisterApplicationMasterResponseReflector { @VisibleForTesting List<Container> getContainersFromPreviousAttemptsUnsafe(final Object response) { if (method != null && response != null) { try { @SuppressWarnings("unchecked") final List<Container> containers = (List<Container>) method.invoke(response); if (containers != ...
RegisterApplicationMasterResponseReflector { @VisibleForTesting List<Container> getContainersFromPreviousAttemptsUnsafe(final Object response) { if (method != null && response != null) { try { @SuppressWarnings("unchecked") final List<Container> containers = (List<Container>) method.invoke(response); if (containers != ...
RegisterApplicationMasterResponseReflector { @VisibleForTesting List<Container> getContainersFromPreviousAttemptsUnsafe(final Object response) { if (method != null && response != null) { try { @SuppressWarnings("unchecked") final List<Container> containers = (List<Container>) method.invoke(response); if (containers != ...
RegisterApplicationMasterResponseReflector { @VisibleForTesting List<Container> getContainersFromPreviousAttemptsUnsafe(final Object response) { if (method != null && response != null) { try { @SuppressWarnings("unchecked") final List<Container> containers = (List<Container>) method.invoke(response); if (containers != ...
@Test public void testDoesntCallMethodIfAbsent() { final RegisterApplicationMasterResponseReflector registerApplicationMasterResponseReflector = new RegisterApplicationMasterResponseReflector(LOG, HasMethod.class); final List<Container> containersFromPreviousAttemptsUnsafe = registerApplicationMasterResponseReflector.g...
@VisibleForTesting List<Container> getContainersFromPreviousAttemptsUnsafe(final Object response) { if (method != null && response != null) { try { @SuppressWarnings("unchecked") final List<Container> containers = (List<Container>) method.invoke(response); if (containers != null && !containers.isEmpty()) { return conta...
RegisterApplicationMasterResponseReflector { @VisibleForTesting List<Container> getContainersFromPreviousAttemptsUnsafe(final Object response) { if (method != null && response != null) { try { @SuppressWarnings("unchecked") final List<Container> containers = (List<Container>) method.invoke(response); if (containers != ...
RegisterApplicationMasterResponseReflector { @VisibleForTesting List<Container> getContainersFromPreviousAttemptsUnsafe(final Object response) { if (method != null && response != null) { try { @SuppressWarnings("unchecked") final List<Container> containers = (List<Container>) method.invoke(response); if (containers != ...
RegisterApplicationMasterResponseReflector { @VisibleForTesting List<Container> getContainersFromPreviousAttemptsUnsafe(final Object response) { if (method != null && response != null) { try { @SuppressWarnings("unchecked") final List<Container> containers = (List<Container>) method.invoke(response); if (containers != ...
RegisterApplicationMasterResponseReflector { @VisibleForTesting List<Container> getContainersFromPreviousAttemptsUnsafe(final Object response) { if (method != null && response != null) { try { @SuppressWarnings("unchecked") final List<Container> containers = (List<Container>) method.invoke(response); if (containers != ...
@Test public void testGetMethodReflectiveHadoop22() { assumeTrue( "Method getContainersFromPreviousAttempts is not supported by Hadoop: " + VersionInfo.getVersion(), isHadoopVersionGreaterThanOrEquals(2, 2)); final RegisterApplicationMasterResponseReflector registerApplicationMasterResponseReflector = new RegisterAppli...
@VisibleForTesting Method getMethod() { return method; }
RegisterApplicationMasterResponseReflector { @VisibleForTesting Method getMethod() { return method; } }
RegisterApplicationMasterResponseReflector { @VisibleForTesting Method getMethod() { return method; } RegisterApplicationMasterResponseReflector(final Logger log); @VisibleForTesting RegisterApplicationMasterResponseReflector(final Logger log, final Class<?> clazz); }
RegisterApplicationMasterResponseReflector { @VisibleForTesting Method getMethod() { return method; } RegisterApplicationMasterResponseReflector(final Logger log); @VisibleForTesting RegisterApplicationMasterResponseReflector(final Logger log, final Class<?> clazz); }
RegisterApplicationMasterResponseReflector { @VisibleForTesting Method getMethod() { return method; } RegisterApplicationMasterResponseReflector(final Logger log); @VisibleForTesting RegisterApplicationMasterResponseReflector(final Logger log, final Class<?> clazz); }
@Test public void testYarnFlinkResourceManagerJobManagerLostLeadership() throws Exception { new JavaTestKit(system) {{ final Deadline deadline = new FiniteDuration(3, TimeUnit.MINUTES).fromNow(); Configuration flinkConfig = new Configuration(); YarnConfiguration yarnConfig = new YarnConfiguration(); SettableLeaderRetri...
static ResourceID extractResourceID(Container container) { return new ResourceID(container.getId().toString()); }
YarnFlinkResourceManager extends FlinkResourceManager<RegisteredYarnWorkerNode> { static ResourceID extractResourceID(Container container) { return new ResourceID(container.getId().toString()); } }
YarnFlinkResourceManager extends FlinkResourceManager<RegisteredYarnWorkerNode> { static ResourceID extractResourceID(Container container) { return new ResourceID(container.getId().toString()); } YarnFlinkResourceManager( Configuration flinkConfig, YarnConfiguration yarnConfig, LeaderRetrievalService leaderRetrie...
YarnFlinkResourceManager extends FlinkResourceManager<RegisteredYarnWorkerNode> { static ResourceID extractResourceID(Container container) { return new ResourceID(container.getId().toString()); } YarnFlinkResourceManager( Configuration flinkConfig, YarnConfiguration yarnConfig, LeaderRetrievalService leaderRetrie...
YarnFlinkResourceManager extends FlinkResourceManager<RegisteredYarnWorkerNode> { static ResourceID extractResourceID(Container container) { return new ResourceID(container.getId().toString()); } YarnFlinkResourceManager( Configuration flinkConfig, YarnConfiguration yarnConfig, LeaderRetrievalService leaderRetrie...
@Test public void testSetupApplicationMasterContainer() { Configuration cfg = new Configuration(); LegacyYarnClusterDescriptor clusterDescriptor = new LegacyYarnClusterDescriptor( cfg, yarnConfiguration, temporaryFolder.getRoot().getAbsolutePath(), yarnClient, true); final String java = "$JAVA_HOME/bin/java"; final Str...
@Override protected String getYarnSessionClusterEntrypoint() { return YarnSessionClusterEntrypoint.class.getName(); }
YarnClusterDescriptor extends AbstractYarnClusterDescriptor { @Override protected String getYarnSessionClusterEntrypoint() { return YarnSessionClusterEntrypoint.class.getName(); } }
YarnClusterDescriptor extends AbstractYarnClusterDescriptor { @Override protected String getYarnSessionClusterEntrypoint() { return YarnSessionClusterEntrypoint.class.getName(); } YarnClusterDescriptor( Configuration flinkConfiguration, YarnConfiguration yarnConfiguration, String configurationDirectory, Yar...
YarnClusterDescriptor extends AbstractYarnClusterDescriptor { @Override protected String getYarnSessionClusterEntrypoint() { return YarnSessionClusterEntrypoint.class.getName(); } YarnClusterDescriptor( Configuration flinkConfiguration, YarnConfiguration yarnConfiguration, String configurationDirectory, Yar...
YarnClusterDescriptor extends AbstractYarnClusterDescriptor { @Override protected String getYarnSessionClusterEntrypoint() { return YarnSessionClusterEntrypoint.class.getName(); } YarnClusterDescriptor( Configuration flinkConfiguration, YarnConfiguration yarnConfiguration, String configurationDirectory, Yar...
@Test public void testStopWorker() throws Exception { new Context() {{ startResourceManager(); CompletableFuture<?> registerSlotRequestFuture = resourceManager.runInMainThread(() -> { rmServices.slotManager.registerSlotRequest( new SlotRequest(new JobID(), new AllocationID(), resourceProfile1, taskHost)); return null; ...
@Override public boolean stopWorker(final YarnWorkerNode workerNode) { final Container container = workerNode.getContainer(); log.info("Stopping container {}.", container.getId()); try { nodeManagerClient.stopContainer(container.getId(), container.getNodeId()); } catch (final Exception e) { log.warn("Error while callin...
YarnResourceManager extends ResourceManager<YarnWorkerNode> implements AMRMClientAsync.CallbackHandler { @Override public boolean stopWorker(final YarnWorkerNode workerNode) { final Container container = workerNode.getContainer(); log.info("Stopping container {}.", container.getId()); try { nodeManagerClient.stopContai...
YarnResourceManager extends ResourceManager<YarnWorkerNode> implements AMRMClientAsync.CallbackHandler { @Override public boolean stopWorker(final YarnWorkerNode workerNode) { final Container container = workerNode.getContainer(); log.info("Stopping container {}.", container.getId()); try { nodeManagerClient.stopContai...
YarnResourceManager extends ResourceManager<YarnWorkerNode> implements AMRMClientAsync.CallbackHandler { @Override public boolean stopWorker(final YarnWorkerNode workerNode) { final Container container = workerNode.getContainer(); log.info("Stopping container {}.", container.getId()); try { nodeManagerClient.stopContai...
YarnResourceManager extends ResourceManager<YarnWorkerNode> implements AMRMClientAsync.CallbackHandler { @Override public boolean stopWorker(final YarnWorkerNode workerNode) { final Container container = workerNode.getContainer(); log.info("Stopping container {}.", container.getId()); try { nodeManagerClient.stopContai...
@Test public void testDeleteApplicationFiles() throws Exception { final Path applicationFilesDir = temporaryFolder.newFolder(".flink").toPath(); Files.createFile(applicationFilesDir.resolve("flink.jar")); assertThat(Files.list(temporaryFolder.getRoot().toPath()).count(), equalTo(1L)); assertThat(Files.list(applicationF...
public static void deleteApplicationFiles(final Map<String, String> env) { final String applicationFilesDir = env.get(YarnConfigKeys.FLINK_YARN_FILES); if (!StringUtils.isNullOrWhitespaceOnly(applicationFilesDir)) { final org.apache.flink.core.fs.Path path = new org.apache.flink.core.fs.Path(applicationFilesDir); try {...
Utils { public static void deleteApplicationFiles(final Map<String, String> env) { final String applicationFilesDir = env.get(YarnConfigKeys.FLINK_YARN_FILES); if (!StringUtils.isNullOrWhitespaceOnly(applicationFilesDir)) { final org.apache.flink.core.fs.Path path = new org.apache.flink.core.fs.Path(applicationFilesDir...
Utils { public static void deleteApplicationFiles(final Map<String, String> env) { final String applicationFilesDir = env.get(YarnConfigKeys.FLINK_YARN_FILES); if (!StringUtils.isNullOrWhitespaceOnly(applicationFilesDir)) { final org.apache.flink.core.fs.Path path = new org.apache.flink.core.fs.Path(applicationFilesDir...
Utils { public static void deleteApplicationFiles(final Map<String, String> env) { final String applicationFilesDir = env.get(YarnConfigKeys.FLINK_YARN_FILES); if (!StringUtils.isNullOrWhitespaceOnly(applicationFilesDir)) { final org.apache.flink.core.fs.Path path = new org.apache.flink.core.fs.Path(applicationFilesDir...
Utils { public static void deleteApplicationFiles(final Map<String, String> env) { final String applicationFilesDir = env.get(YarnConfigKeys.FLINK_YARN_FILES); if (!StringUtils.isNullOrWhitespaceOnly(applicationFilesDir)) { final org.apache.flink.core.fs.Path path = new org.apache.flink.core.fs.Path(applicationFilesDir...
@Test public void testHistogramReporting() throws Exception { MetricRegistryImpl registry = null; String histogramName = "histogram"; try { Configuration config = new Configuration(); config.setString(ConfigConstants.METRICS_REPORTER_PREFIX + "jmx_test." + ConfigConstants.METRICS_REPORTER_CLASS_SUFFIX, JMXReporter.clas...
static Hashtable<String, String> generateJmxTable(Map<String, String> variables) { Hashtable<String, String> ht = new Hashtable<>(variables.size()); for (Map.Entry<String, String> variable : variables.entrySet()) { ht.put(replaceInvalidChars(variable.getKey()), replaceInvalidChars(variable.getValue())); } return ht; }
JMXReporter implements MetricReporter { static Hashtable<String, String> generateJmxTable(Map<String, String> variables) { Hashtable<String, String> ht = new Hashtable<>(variables.size()); for (Map.Entry<String, String> variable : variables.entrySet()) { ht.put(replaceInvalidChars(variable.getKey()), replaceInvalidChar...
JMXReporter implements MetricReporter { static Hashtable<String, String> generateJmxTable(Map<String, String> variables) { Hashtable<String, String> ht = new Hashtable<>(variables.size()); for (Map.Entry<String, String> variable : variables.entrySet()) { ht.put(replaceInvalidChars(variable.getKey()), replaceInvalidChar...
JMXReporter implements MetricReporter { static Hashtable<String, String> generateJmxTable(Map<String, String> variables) { Hashtable<String, String> ht = new Hashtable<>(variables.size()); for (Map.Entry<String, String> variable : variables.entrySet()) { ht.put(replaceInvalidChars(variable.getKey()), replaceInvalidChar...
JMXReporter implements MetricReporter { static Hashtable<String, String> generateJmxTable(Map<String, String> variables) { Hashtable<String, String> ht = new Hashtable<>(variables.size()); for (Map.Entry<String, String> variable : variables.entrySet()) { ht.put(replaceInvalidChars(variable.getKey()), replaceInvalidChar...
@Test public void testMeterReporting() throws Exception { MetricRegistryImpl registry = null; String meterName = "meter"; try { Configuration config = new Configuration(); config.setString(ConfigConstants.METRICS_REPORTER_PREFIX + "jmx_test." + ConfigConstants.METRICS_REPORTER_CLASS_SUFFIX, JMXReporter.class.getName())...
static Hashtable<String, String> generateJmxTable(Map<String, String> variables) { Hashtable<String, String> ht = new Hashtable<>(variables.size()); for (Map.Entry<String, String> variable : variables.entrySet()) { ht.put(replaceInvalidChars(variable.getKey()), replaceInvalidChars(variable.getValue())); } return ht; }
JMXReporter implements MetricReporter { static Hashtable<String, String> generateJmxTable(Map<String, String> variables) { Hashtable<String, String> ht = new Hashtable<>(variables.size()); for (Map.Entry<String, String> variable : variables.entrySet()) { ht.put(replaceInvalidChars(variable.getKey()), replaceInvalidChar...
JMXReporter implements MetricReporter { static Hashtable<String, String> generateJmxTable(Map<String, String> variables) { Hashtable<String, String> ht = new Hashtable<>(variables.size()); for (Map.Entry<String, String> variable : variables.entrySet()) { ht.put(replaceInvalidChars(variable.getKey()), replaceInvalidChar...
JMXReporter implements MetricReporter { static Hashtable<String, String> generateJmxTable(Map<String, String> variables) { Hashtable<String, String> ht = new Hashtable<>(variables.size()); for (Map.Entry<String, String> variable : variables.entrySet()) { ht.put(replaceInvalidChars(variable.getKey()), replaceInvalidChar...
JMXReporter implements MetricReporter { static Hashtable<String, String> generateJmxTable(Map<String, String> variables) { Hashtable<String, String> ht = new Hashtable<>(variables.size()); for (Map.Entry<String, String> variable : variables.entrySet()) { ht.put(replaceInvalidChars(variable.getKey()), replaceInvalidChar...
@Test public void testAddingMetrics() throws Exception { Configuration configuration = new Configuration(); String taskName = "testTask"; String jobName = "testJob:-!ax..?"; String hostname = "local::host:"; String taskManagerId = "tas:kMana::ger"; String counterName = "testCounter"; configuration.setString( ConfigCons...
@Override public String filterCharacters(String input) { char[] chars = null; final int strLen = input.length(); int pos = 0; for (int i = 0; i < strLen; i++) { final char c = input.charAt(i); switch (c) { case ':': if (chars == null) { chars = input.toCharArray(); } chars[pos++] = '-'; break; default: if (chars != nul...
StatsDReporter extends AbstractReporter implements Scheduled { @Override public String filterCharacters(String input) { char[] chars = null; final int strLen = input.length(); int pos = 0; for (int i = 0; i < strLen; i++) { final char c = input.charAt(i); switch (c) { case ':': if (chars == null) { chars = input.toChar...
StatsDReporter extends AbstractReporter implements Scheduled { @Override public String filterCharacters(String input) { char[] chars = null; final int strLen = input.length(); int pos = 0; for (int i = 0; i < strLen; i++) { final char c = input.charAt(i); switch (c) { case ':': if (chars == null) { chars = input.toChar...
StatsDReporter extends AbstractReporter implements Scheduled { @Override public String filterCharacters(String input) { char[] chars = null; final int strLen = input.length(); int pos = 0; for (int i = 0; i < strLen; i++) { final char c = input.charAt(i); switch (c) { case ':': if (chars == null) { chars = input.toChar...
StatsDReporter extends AbstractReporter implements Scheduled { @Override public String filterCharacters(String input) { char[] chars = null; final int strLen = input.length(); int pos = 0; for (int i = 0; i < strLen; i++) { final char c = input.charAt(i); switch (c) { case ':': if (chars == null) { chars = input.toChar...
@Test public void cannotStartTwoReportersOnSamePort() throws Exception { final MetricRegistryImpl fixedPort1 = new MetricRegistryImpl(MetricRegistryConfiguration.fromConfiguration(createConfigWithOneReporter("test1", portRangeProvider.next()))); assertThat(fixedPort1.getReporters(), hasSize(1)); PrometheusReporter firs...
@VisibleForTesting int getPort() { Preconditions.checkState(httpServer != null, "Server has not been initialized."); return port; }
PrometheusReporter implements MetricReporter { @VisibleForTesting int getPort() { Preconditions.checkState(httpServer != null, "Server has not been initialized."); return port; } }
PrometheusReporter implements MetricReporter { @VisibleForTesting int getPort() { Preconditions.checkState(httpServer != null, "Server has not been initialized."); return port; } }
PrometheusReporter implements MetricReporter { @VisibleForTesting int getPort() { Preconditions.checkState(httpServer != null, "Server has not been initialized."); return port; } @Override void open(MetricConfig config); @Override void close(); @Override void notifyOfAddedMetric(final Metric metric, final String metri...
PrometheusReporter implements MetricReporter { @VisibleForTesting int getPort() { Preconditions.checkState(httpServer != null, "Server has not been initialized."); return port; } @Override void open(MetricConfig config); @Override void close(); @Override void notifyOfAddedMetric(final Metric metric, final String metri...
@Test public void testCreatingDescription() { final String expectedTable = "<table class=\"table table-bordered\">\n" + " <thead>\n" + " <tr>\n" + " <th class=\"text-left\" style=\"width: 20%\">Key</th>\n" + " <th class=\"text-left\" style=\"width: 15%\">Default</th>\n" + " <th class=\"text-left\" style=\"width: 65%\">...
@VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> tables; if (configGroups != ...
ConfigOptionsDocGenerator { @VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> ...
ConfigOptionsDocGenerator { @VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> ...
ConfigOptionsDocGenerator { @VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> ...
ConfigOptionsDocGenerator { @VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> ...
@Test public void testCreatingMultipleGroups() { final List<Tuple2<ConfigGroup, String>> tables = ConfigOptionsDocGenerator.generateTablesForClass( TestConfigMultipleSubGroup.class); assertEquals(tables.size(), 3); final HashMap<String, String> tablesConverted = new HashMap<>(); for (Tuple2<ConfigGroup, String> table :...
@VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> tables; if (configGroups != ...
ConfigOptionsDocGenerator { @VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> ...
ConfigOptionsDocGenerator { @VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> ...
ConfigOptionsDocGenerator { @VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> ...
ConfigOptionsDocGenerator { @VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> ...
@Test public void testOverrideDefault() { final String expectedTable = "<table class=\"table table-bordered\">\n" + " <thead>\n" + " <tr>\n" + " <th class=\"text-left\" style=\"width: 20%\">Key</th>\n" + " <th class=\"text-left\" style=\"width: 15%\">Default</th>\n" + " <th class=\"text-left\" style=\"width: 65%\">Desc...
@VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> tables; if (configGroups != ...
ConfigOptionsDocGenerator { @VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> ...
ConfigOptionsDocGenerator { @VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> ...
ConfigOptionsDocGenerator { @VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> ...
ConfigOptionsDocGenerator { @VisibleForTesting static List<Tuple2<ConfigGroup, String>> generateTablesForClass(Class<?> optionsClass) { ConfigGroups configGroups = optionsClass.getAnnotation(ConfigGroups.class); List<OptionWithMetaInfo> allOptions = extractConfigOptions(optionsClass); List<Tuple2<ConfigGroup, String>> ...
@Test(expected = ConversionException.class) public void testJarIdWithParentDir() throws Exception { jarIdPathParameter.convertFromString("../../test.jar"); }
@Override protected String convertFromString(final String value) throws ConversionException { final Path path = Paths.get(value); if (path.getParent() != null) { throw new ConversionException(String.format("%s must be a filename only (%s)", KEY, path)); } return value; }
JarIdPathParameter extends MessagePathParameter<String> { @Override protected String convertFromString(final String value) throws ConversionException { final Path path = Paths.get(value); if (path.getParent() != null) { throw new ConversionException(String.format("%s must be a filename only (%s)", KEY, path)); } return...
JarIdPathParameter extends MessagePathParameter<String> { @Override protected String convertFromString(final String value) throws ConversionException { final Path path = Paths.get(value); if (path.getParent() != null) { throw new ConversionException(String.format("%s must be a filename only (%s)", KEY, path)); } return...
JarIdPathParameter extends MessagePathParameter<String> { @Override protected String convertFromString(final String value) throws ConversionException { final Path path = Paths.get(value); if (path.getParent() != null) { throw new ConversionException(String.format("%s must be a filename only (%s)", KEY, path)); } return...
JarIdPathParameter extends MessagePathParameter<String> { @Override protected String convertFromString(final String value) throws ConversionException { final Path path = Paths.get(value); if (path.getParent() != null) { throw new ConversionException(String.format("%s must be a filename only (%s)", KEY, path)); } return...
@Test public void testConvertFromString() throws Exception { final String expectedJarId = "test.jar"; final String jarId = jarIdPathParameter.convertFromString(expectedJarId); assertEquals(expectedJarId, jarId); }
@Override protected String convertFromString(final String value) throws ConversionException { final Path path = Paths.get(value); if (path.getParent() != null) { throw new ConversionException(String.format("%s must be a filename only (%s)", KEY, path)); } return value; }
JarIdPathParameter extends MessagePathParameter<String> { @Override protected String convertFromString(final String value) throws ConversionException { final Path path = Paths.get(value); if (path.getParent() != null) { throw new ConversionException(String.format("%s must be a filename only (%s)", KEY, path)); } return...
JarIdPathParameter extends MessagePathParameter<String> { @Override protected String convertFromString(final String value) throws ConversionException { final Path path = Paths.get(value); if (path.getParent() != null) { throw new ConversionException(String.format("%s must be a filename only (%s)", KEY, path)); } return...
JarIdPathParameter extends MessagePathParameter<String> { @Override protected String convertFromString(final String value) throws ConversionException { final Path path = Paths.get(value); if (path.getParent() != null) { throw new ConversionException(String.format("%s must be a filename only (%s)", KEY, path)); } return...
JarIdPathParameter extends MessagePathParameter<String> { @Override protected String convertFromString(final String value) throws ConversionException { final Path path = Paths.get(value); if (path.getParent() != null) { throw new ConversionException(String.format("%s must be a filename only (%s)", KEY, path)); } return...
@Test public void testListStateDescriptor() throws Exception { TypeSerializer<String> serializer = new KryoSerializer<>(String.class, new ExecutionConfig()); ListStateDescriptor<String> descr = new ListStateDescriptor<>("testName", serializer); assertEquals("testName", descr.getName()); assertNotNull(descr.getSerialize...
public ListStateDescriptor(String name, Class<T> elementTypeClass) { super(name, new ListTypeInfo<>(elementTypeClass), null); }
ListStateDescriptor extends StateDescriptor<ListState<T>, List<T>> { public ListStateDescriptor(String name, Class<T> elementTypeClass) { super(name, new ListTypeInfo<>(elementTypeClass), null); } }
ListStateDescriptor extends StateDescriptor<ListState<T>, List<T>> { public ListStateDescriptor(String name, Class<T> elementTypeClass) { super(name, new ListTypeInfo<>(elementTypeClass), null); } ListStateDescriptor(String name, Class<T> elementTypeClass); ListStateDescriptor(String name, TypeInformation<T> elementTy...
ListStateDescriptor extends StateDescriptor<ListState<T>, List<T>> { public ListStateDescriptor(String name, Class<T> elementTypeClass) { super(name, new ListTypeInfo<>(elementTypeClass), null); } ListStateDescriptor(String name, Class<T> elementTypeClass); ListStateDescriptor(String name, TypeInformation<T> elementTy...
ListStateDescriptor extends StateDescriptor<ListState<T>, List<T>> { public ListStateDescriptor(String name, Class<T> elementTypeClass) { super(name, new ListTypeInfo<>(elementTypeClass), null); } ListStateDescriptor(String name, Class<T> elementTypeClass); ListStateDescriptor(String name, TypeInformation<T> elementTy...
@Test public void testSerializerDuplication() { TypeSerializer<String> statefulSerializer = new KryoSerializer<>(String.class, new ExecutionConfig()); ListStateDescriptor<String> descr = new ListStateDescriptor<>("foobar", statefulSerializer); TypeSerializer<String> serializerA = descr.getElementSerializer(); TypeSeria...
public TypeSerializer<T> getElementSerializer() { final TypeSerializer<List<T>> rawSerializer = getSerializer(); if (!(rawSerializer instanceof ListSerializer)) { throw new IllegalStateException(); } return ((ListSerializer<T>) rawSerializer).getElementSerializer(); }
ListStateDescriptor extends StateDescriptor<ListState<T>, List<T>> { public TypeSerializer<T> getElementSerializer() { final TypeSerializer<List<T>> rawSerializer = getSerializer(); if (!(rawSerializer instanceof ListSerializer)) { throw new IllegalStateException(); } return ((ListSerializer<T>) rawSerializer).getEleme...
ListStateDescriptor extends StateDescriptor<ListState<T>, List<T>> { public TypeSerializer<T> getElementSerializer() { final TypeSerializer<List<T>> rawSerializer = getSerializer(); if (!(rawSerializer instanceof ListSerializer)) { throw new IllegalStateException(); } return ((ListSerializer<T>) rawSerializer).getEleme...
ListStateDescriptor extends StateDescriptor<ListState<T>, List<T>> { public TypeSerializer<T> getElementSerializer() { final TypeSerializer<List<T>> rawSerializer = getSerializer(); if (!(rawSerializer instanceof ListSerializer)) { throw new IllegalStateException(); } return ((ListSerializer<T>) rawSerializer).getEleme...
ListStateDescriptor extends StateDescriptor<ListState<T>, List<T>> { public TypeSerializer<T> getElementSerializer() { final TypeSerializer<List<T>> rawSerializer = getSerializer(); if (!(rawSerializer instanceof ListSerializer)) { throw new IllegalStateException(); } return ((ListSerializer<T>) rawSerializer).getEleme...
@Test public void testSerializerDuplication() throws Exception { TypeSerializer<String> statefulSerializer = new KryoSerializer<>(String.class, new ExecutionConfig()); TestStateDescriptor<String> descr = new TestStateDescriptor<>("foobar", statefulSerializer); TypeSerializer<String> serializerA = descr.getSerializer();...
public TypeSerializer<T> getSerializer() { if (serializer != null) { return serializer.duplicate(); } else { throw new IllegalStateException("Serializer not yet initialized."); } }
StateDescriptor implements Serializable { public TypeSerializer<T> getSerializer() { if (serializer != null) { return serializer.duplicate(); } else { throw new IllegalStateException("Serializer not yet initialized."); } } }
StateDescriptor implements Serializable { public TypeSerializer<T> getSerializer() { if (serializer != null) { return serializer.duplicate(); } else { throw new IllegalStateException("Serializer not yet initialized."); } } protected StateDescriptor(String name, TypeSerializer<T> serializer, @Nullable T defaultValue); ...
StateDescriptor implements Serializable { public TypeSerializer<T> getSerializer() { if (serializer != null) { return serializer.duplicate(); } else { throw new IllegalStateException("Serializer not yet initialized."); } } protected StateDescriptor(String name, TypeSerializer<T> serializer, @Nullable T defaultValue); ...
StateDescriptor implements Serializable { public TypeSerializer<T> getSerializer() { if (serializer != null) { return serializer.duplicate(); } else { throw new IllegalStateException("Serializer not yet initialized."); } } protected StateDescriptor(String name, TypeSerializer<T> serializer, @Nullable T defaultValue); ...
@Test public void testReducingStateDescriptor() throws Exception { ReduceFunction<String> reducer = (a, b) -> a; TypeSerializer<String> serializer = new KryoSerializer<>(String.class, new ExecutionConfig()); ReducingStateDescriptor<String> descr = new ReducingStateDescriptor<>("testName", reducer, serializer); assertEq...
public ReducingStateDescriptor(String name, ReduceFunction<T> reduceFunction, Class<T> typeClass) { super(name, typeClass, null); this.reduceFunction = checkNotNull(reduceFunction); if (reduceFunction instanceof RichFunction) { throw new UnsupportedOperationException("ReduceFunction of ReducingState can not be a RichFu...
ReducingStateDescriptor extends StateDescriptor<ReducingState<T>, T> { public ReducingStateDescriptor(String name, ReduceFunction<T> reduceFunction, Class<T> typeClass) { super(name, typeClass, null); this.reduceFunction = checkNotNull(reduceFunction); if (reduceFunction instanceof RichFunction) { throw new Unsupported...
ReducingStateDescriptor extends StateDescriptor<ReducingState<T>, T> { public ReducingStateDescriptor(String name, ReduceFunction<T> reduceFunction, Class<T> typeClass) { super(name, typeClass, null); this.reduceFunction = checkNotNull(reduceFunction); if (reduceFunction instanceof RichFunction) { throw new Unsupported...
ReducingStateDescriptor extends StateDescriptor<ReducingState<T>, T> { public ReducingStateDescriptor(String name, ReduceFunction<T> reduceFunction, Class<T> typeClass) { super(name, typeClass, null); this.reduceFunction = checkNotNull(reduceFunction); if (reduceFunction instanceof RichFunction) { throw new Unsupported...
ReducingStateDescriptor extends StateDescriptor<ReducingState<T>, T> { public ReducingStateDescriptor(String name, ReduceFunction<T> reduceFunction, Class<T> typeClass) { super(name, typeClass, null); this.reduceFunction = checkNotNull(reduceFunction); if (reduceFunction instanceof RichFunction) { throw new Unsupported...
@Test public void testMapStateDescriptor() throws Exception { TypeSerializer<Integer> keySerializer = new KryoSerializer<>(Integer.class, new ExecutionConfig()); TypeSerializer<String> valueSerializer = new KryoSerializer<>(String.class, new ExecutionConfig()); MapStateDescriptor<Integer, String> descr = new MapStateDe...
public MapStateDescriptor(String name, TypeSerializer<UK> keySerializer, TypeSerializer<UV> valueSerializer) { super(name, new MapSerializer<>(keySerializer, valueSerializer), null); }
MapStateDescriptor extends StateDescriptor<MapState<UK, UV>, Map<UK, UV>> { public MapStateDescriptor(String name, TypeSerializer<UK> keySerializer, TypeSerializer<UV> valueSerializer) { super(name, new MapSerializer<>(keySerializer, valueSerializer), null); } }
MapStateDescriptor extends StateDescriptor<MapState<UK, UV>, Map<UK, UV>> { public MapStateDescriptor(String name, TypeSerializer<UK> keySerializer, TypeSerializer<UV> valueSerializer) { super(name, new MapSerializer<>(keySerializer, valueSerializer), null); } MapStateDescriptor(String name, TypeSerializer<UK> keySeria...
MapStateDescriptor extends StateDescriptor<MapState<UK, UV>, Map<UK, UV>> { public MapStateDescriptor(String name, TypeSerializer<UK> keySerializer, TypeSerializer<UV> valueSerializer) { super(name, new MapSerializer<>(keySerializer, valueSerializer), null); } MapStateDescriptor(String name, TypeSerializer<UK> keySeria...
MapStateDescriptor extends StateDescriptor<MapState<UK, UV>, Map<UK, UV>> { public MapStateDescriptor(String name, TypeSerializer<UK> keySerializer, TypeSerializer<UV> valueSerializer) { super(name, new MapSerializer<>(keySerializer, valueSerializer), null); } MapStateDescriptor(String name, TypeSerializer<UK> keySeria...
@Test public void testConvertToString() throws Exception { final String expected = "test.jar"; final String toString = jarIdPathParameter.convertToString(expected); assertEquals(expected, toString); }
@Override protected String convertToString(final String value) { return value; }
JarIdPathParameter extends MessagePathParameter<String> { @Override protected String convertToString(final String value) { return value; } }
JarIdPathParameter extends MessagePathParameter<String> { @Override protected String convertToString(final String value) { return value; } protected JarIdPathParameter(); }
JarIdPathParameter extends MessagePathParameter<String> { @Override protected String convertToString(final String value) { return value; } protected JarIdPathParameter(); }
JarIdPathParameter extends MessagePathParameter<String> { @Override protected String convertToString(final String value) { return value; } protected JarIdPathParameter(); static final String KEY; }
@Test public void testIsValid() throws Exception { ResourceSpec rs = ResourceSpec.newBuilder().setCpuCores(1.0).setHeapMemoryInMB(100).build(); assertTrue(rs.isValid()); rs = ResourceSpec.newBuilder(). setCpuCores(1.0). setHeapMemoryInMB(100). setGPUResource(1). build(); assertTrue(rs.isValid()); rs = ResourceSpec.newB...
public boolean isValid() { if (this.cpuCores >= 0 && this.heapMemoryInMB >= 0 && this.directMemoryInMB >= 0 && this.nativeMemoryInMB >= 0 && this.stateSizeInMB >= 0) { for (Resource resource : extendedResources.values()) { if (resource.getValue() < 0) { return false; } } return true; } else { return false; } }
ResourceSpec implements Serializable { public boolean isValid() { if (this.cpuCores >= 0 && this.heapMemoryInMB >= 0 && this.directMemoryInMB >= 0 && this.nativeMemoryInMB >= 0 && this.stateSizeInMB >= 0) { for (Resource resource : extendedResources.values()) { if (resource.getValue() < 0) { return false; } } return tr...
ResourceSpec implements Serializable { public boolean isValid() { if (this.cpuCores >= 0 && this.heapMemoryInMB >= 0 && this.directMemoryInMB >= 0 && this.nativeMemoryInMB >= 0 && this.stateSizeInMB >= 0) { for (Resource resource : extendedResources.values()) { if (resource.getValue() < 0) { return false; } } return tr...
ResourceSpec implements Serializable { public boolean isValid() { if (this.cpuCores >= 0 && this.heapMemoryInMB >= 0 && this.directMemoryInMB >= 0 && this.nativeMemoryInMB >= 0 && this.stateSizeInMB >= 0) { for (Resource resource : extendedResources.values()) { if (resource.getValue() < 0) { return false; } } return tr...
ResourceSpec implements Serializable { public boolean isValid() { if (this.cpuCores >= 0 && this.heapMemoryInMB >= 0 && this.directMemoryInMB >= 0 && this.nativeMemoryInMB >= 0 && this.stateSizeInMB >= 0) { for (Resource resource : extendedResources.values()) { if (resource.getValue() < 0) { return false; } } return tr...
@Test public void testLessThanOrEqual() throws Exception { ResourceSpec rs1 = ResourceSpec.newBuilder().setCpuCores(1.0).setHeapMemoryInMB(100).build(); ResourceSpec rs2 = ResourceSpec.newBuilder().setCpuCores(1.0).setHeapMemoryInMB(100).build(); assertTrue(rs1.lessThanOrEqual(rs2)); assertTrue(rs2.lessThanOrEqual(rs1)...
public boolean lessThanOrEqual(@Nonnull ResourceSpec other) { int cmp1 = Double.compare(this.cpuCores, other.cpuCores); int cmp2 = Integer.compare(this.heapMemoryInMB, other.heapMemoryInMB); int cmp3 = Integer.compare(this.directMemoryInMB, other.directMemoryInMB); int cmp4 = Integer.compare(this.nativeMemoryInMB, othe...
ResourceSpec implements Serializable { public boolean lessThanOrEqual(@Nonnull ResourceSpec other) { int cmp1 = Double.compare(this.cpuCores, other.cpuCores); int cmp2 = Integer.compare(this.heapMemoryInMB, other.heapMemoryInMB); int cmp3 = Integer.compare(this.directMemoryInMB, other.directMemoryInMB); int cmp4 = Inte...
ResourceSpec implements Serializable { public boolean lessThanOrEqual(@Nonnull ResourceSpec other) { int cmp1 = Double.compare(this.cpuCores, other.cpuCores); int cmp2 = Integer.compare(this.heapMemoryInMB, other.heapMemoryInMB); int cmp3 = Integer.compare(this.directMemoryInMB, other.directMemoryInMB); int cmp4 = Inte...
ResourceSpec implements Serializable { public boolean lessThanOrEqual(@Nonnull ResourceSpec other) { int cmp1 = Double.compare(this.cpuCores, other.cpuCores); int cmp2 = Integer.compare(this.heapMemoryInMB, other.heapMemoryInMB); int cmp3 = Integer.compare(this.directMemoryInMB, other.directMemoryInMB); int cmp4 = Inte...
ResourceSpec implements Serializable { public boolean lessThanOrEqual(@Nonnull ResourceSpec other) { int cmp1 = Double.compare(this.cpuCores, other.cpuCores); int cmp2 = Integer.compare(this.heapMemoryInMB, other.heapMemoryInMB); int cmp3 = Integer.compare(this.directMemoryInMB, other.directMemoryInMB); int cmp4 = Inte...