diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2018-02-05 14:58:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-05 14:58:39 +0100 |
commit | 9ed2f7678b9fe349ed84a263bb2e21f0b4aa3092 (patch) | |
tree | cc18e3e07d1ea1e0a29290666b326888ce93593a /vespaclient-container-plugin | |
parent | 991c15e111f6ff9ab7a5b08193c8e62371916eca (diff) | |
parent | f989cf0dead4839a22a17fa2c60705340912d55f (diff) |
Merge pull request #4915 from vespa-engine/geirst/misc-cleanup-after-new-document-api-protocol
Geirst/misc cleanup after new document api protocol
Diffstat (limited to 'vespaclient-container-plugin')
4 files changed, 6 insertions, 5 deletions
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/BucketSpaceEnumerator.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/BucketSpaceEnumerator.java index 24692859266..6fbec41aba1 100644 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/BucketSpaceEnumerator.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/BucketSpaceEnumerator.java @@ -9,7 +9,7 @@ import java.util.Map; import java.util.stream.Collectors; /** - * TODO description + * Class that based on BucketspacesConfig builds a mapping from document type to which bucket space it belongs to. */ class BucketSpaceEnumerator { diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/OperationHandlerImpl.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/OperationHandlerImpl.java index d6ae4a9285a..af8650a8e7c 100644 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/OperationHandlerImpl.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/OperationHandlerImpl.java @@ -323,7 +323,7 @@ public class OperationHandlerImpl implements OperationHandler { if (!targetBucketSpace.isPresent()) { throw new RestApiException(Response.createErrorResponse(400, String.format( "Document type '%s' in cluster '%s' is not mapped to a known bucket space", docType, clusterDef.getName()), - RestUri.apiErrorCodes.UNKNOWN_BUCKET_SPACE)); // TODO own code + RestUri.apiErrorCodes.UNKNOWN_BUCKET_SPACE)); } return new BucketSpaceRoute(clusterDefToRoute(clusterDef), targetBucketSpace.get()); } diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/RestUri.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/RestUri.java index 15d1b54adbe..e3423eec2c8 100644 --- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/RestUri.java +++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/RestUri.java @@ -34,14 +34,15 @@ public class RestUri { URL_PARSING(-6), INVALID_CREATE_VALUE(-7), TOO_MANY_PARALLEL_REQUESTS(-8), - MISSING_CLUSTER(-9), UNKNOWN_BUCKET_SPACE(-9), INTERNAL_EXCEPTION(-9), + MISSING_CLUSTER(-9), INTERNAL_EXCEPTION(-9), DOCUMENT_CONDITION_NOT_MET(-10), DOCUMENT_EXCPETION(-11), PARSER_ERROR(-11), GROUP_AND_EXPRESSION_ERROR(-12), TIME_OUT(-13), INTERRUPTED(-14), - UNSPECIFIED(-15); + UNSPECIFIED(-15), + UNKNOWN_BUCKET_SPACE(-16); public final long value; apiErrorCodes(long value) { diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/OperationHandlerImplTest.java b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/OperationHandlerImplTest.java index 3a6782f5830..06054bd2dbb 100644 --- a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/OperationHandlerImplTest.java +++ b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/OperationHandlerImplTest.java @@ -212,7 +212,7 @@ public class OperationHandlerImplTest { String errorMsg = renderRestApiExceptionAsString(e); // FIXME isn't this really more of a case of unknown document type..? assertThat(errorMsg, is("{\"errors\":[{\"description\":" + - "\"UNKNOWN_BUCKET_SPACE Document type 'document-type' in cluster 'foo' is not mapped to a known bucket space\",\"id\":-9}]}")); + "\"UNKNOWN_BUCKET_SPACE Document type 'document-type' in cluster 'foo' is not mapped to a known bucket space\",\"id\":-16}]}")); } } |