hms-lambda-handler/src/main/java/com/amazonaws/athena/hms/MetadataHandler.java [119:133]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      String responseAsString = objectMapper.writerFor(handlerContext.getResponseClass()).writeValueAsString(apiResponse);
      // get the response String size
      long responseSize = responseAsString.getBytes().length;
      context.getLogger().log("Response size: " + responseSize);
      MetadataResponse response;
      if (responseSize >= responseSpillThreshold) {
        String spillPath = spillToS3(context, responseAsString);
        context.getLogger().log("Response size " + responseAsString.length() + " exceeded threshold "
            + responseSpillThreshold + ", is saved to s3: " + spillPath);
        response = new MetadataResponse(apiName, true, spillPath, null);
      }
      else {
        response = new MetadataResponse(apiName, false, null, apiResponse);
      }
      objectMapper.writeValue(outputStream, response);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



hms-lambda-rnp/src/main/java/com/amazonaws/athena/HiveMetaStoreRnPBaseLambdaFunc.java [197:211]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      String responseAsString = objectMapper.writerFor(handlerContext.getResponseClass()).writeValueAsString(apiResponse);
      // get the response String size
      long responseSize = responseAsString.getBytes().length;
      context.getLogger().log("Response size: " + responseSize);
      MetadataResponse response;
      if (responseSize >= responseSpillThreshold) {
        String spillPath = spillToS3(context, responseAsString);
        context.getLogger().log("Response size " + responseAsString.length() + " exceeded threshold "
            + responseSpillThreshold + ", is saved to s3: " + spillPath);
        response = new MetadataResponse(apiName, true, spillPath, null);
      }
      else {
        response = new MetadataResponse(apiName, false, null, apiResponse);
      }
      objectMapper.writeValue(outputStream, response);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



