THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
place-container --deployment-id 1581635852024-5117e303 --app-name snjain-test-cp --app.id = 1 --processor-id 4 --request-expiry 10 --destination-host abc.prod.com |
...
Code Block |
---|
@CommandLine.Command(name = "place-container", description = "Request to move/restart container at destination-host") public class ContainerPlacementTool { ... _appName = // read from MetadataStore metadataStorecommandline _appId = buildMetadataStore(); // read from commandline _deploymentId = // read from commandline _processorId = // read from commandline _destinationHost = // read from commandline _requestExpiry = // read from commandline MetadataStore metadataStore = buildMetadataStore(appName, appId); try { ContainerPlacementMetadataStore containerPlacementMetadataStore = new ContainerPlacementMetadataStore(metadataStore); containerPlacementMetadataStore.start(); Duration requestExpiry = _requestExpiry != null ? Duration.ofSeconds(_requestExpiry) : null; UUID uuid = containerPlacementMetadataStore.writeContainerPlacementRequestMessage(_deploymentId, _processorId, _destinationHost, requestExpiry, System.currentTimeMillis()); System.out.println("Request received query the status using: " + uuid); } finally { samzaJob.close(); metadataStore.close(); } } |
...