public static boolean updateChildJobStatus()

in src/main/java/com/amazonaws/kda/flink/benchmarking/util/DDBUtil.java [26:40]


	public static boolean updateChildJobStatus(DynamoDB dynamoDBClient, String dynamoDBTblName, String jobName,
			String jobId, String jobFinishTime, String jobStatus) {
		boolean itemUpdated = false;
		Table table = dynamoDBClient.getTable(dynamoDBTblName);

		AttributeUpdate attributeUpdate = new AttributeUpdate("strAttr").put("Completed");
		UpdateItemSpec updateItemSpec = new UpdateItemSpec().withPrimaryKey("job_name", jobName, "job_id", jobId)
				.withAttributeUpdate(attributeUpdate);
		UpdateItemOutcome outcome = table.updateItem(updateItemSpec);
		int statusCode = outcome.getUpdateItemResult().getSdkHttpMetadata().getHttpStatusCode();
		if (statusCode == 200) {
			itemUpdated = true;
		}
		return itemUpdated;
	}