public static boolean insertChildJobStatus()

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


	public static boolean insertChildJobStatus(DynamoDB dynamoDBClient, String dynamoDBTblName, String jobName, String jobId, String parentJobId,
			int numInteractionsProcessed, String jobStartTime, String jobStatus) {

		boolean itemInserted = false;
		Table table = dynamoDBClient.getTable(dynamoDBTblName);
		Item item = new Item().withPrimaryKey("job_name", jobName)
				.withString("job_id", jobId)
				.withString("parent_job_id", parentJobId)
				.withString("job_status", jobStatus)
				.withNumber("number_of_interactions_processed", numInteractionsProcessed)
				.withString("job_starttime", jobStartTime);
		try {
			PutItemOutcome outcome = table.putItem(item);
			int statusCode = outcome.getPutItemResult().getSdkHttpMetadata().getHttpStatusCode();
			if (statusCode == 200) {
				itemInserted = true;
			}
		} catch (Exception e) {
			e.printStackTrace();
			System.out.println("Item could not be inserted to DynamoDB table.");
		}
		return itemInserted;
	}