blob: 94505efcb707cc8fda2b7aaaf45aa76fdbfed184 [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# Language used for error configuration: HOCON: Human Optimized Config Object Notation
# It keeps the semantics (tree structure; set of types; encoding/escaping)from JSON,
# and makes it more convenient and readable for humans ).
# More reading: https://github.com/typesafehub/config/blob/master/HOCON.md
# Typesafe config library license: Apache License Version 2.0, January 2004
# Define HTTP status codes
BAD_REQUEST = 400
NOT_FOUND = 404
UNAUTHORIZED = 401
GONE = 410
TOO_MANY_REQUESTS = 429
INTERNAL_SERVER_ERROR = 500
# Define all module specific errors
# lensCommonErrors: Defined for lens-api module and expected to be used by every other module
lensCommonErrors = [
{
errorCode = 1001
httpStatusCode = ${INTERNAL_SERVER_ERROR}
errorMsg = "Internal Server Error."
}
{
errorCode = 1002
httpStatusCode = ${BAD_REQUEST}
errorMsg = "XML invalid: %s"
}
{
errorCode = 1003
httpStatusCode = ${NOT_FOUND}
errorMsg = "The specified %s with identifier %s does not exist"
}
{
errorCode = 1004
httpStatusCode = ${UNAUTHORIZED}
errorMsg = "User does not have %s access to %s:%s"
}
{
errorCode = 1005
httpStatusCode = ${BAD_REQUEST}
errorMsg = "These parameters are missing and are required : %s"
}
{
errorCode = 1006
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Value provided {%s} for parameter {%s} is invalid due to {%s}"
}
]
# lensServerErrors: Defined for lens-server module
lensServerErrors = [
{
errorCode = 2001
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Session id not provided. Please provide a session id."
}
{
errorCode = 2002
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Query is not provided, or it is empty or blank. Please provide a valid query."
}
{
errorCode = 2003
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Provided Operation is not supported. Supported Operations are: [%s]"
payloadClass = org.apache.lens.api.SupportedOperations
}
{
errorCode = 2004
httpStatusCode = ${TOO_MANY_REQUESTS}
errorMsg = "Too many opened sessions for [%s] user. Session limit [%d] is already reached"
}
{
errorCode = 2005
httpStatusCode = ${GONE}
errorMsg = "Session %s was closed"
}
{
errorCode = 2006
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Invalid Handle: %s"
}
{
errorCode = 2007
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Unsupported null value received for argument type: %s"
}
]
# lensCubeErrors: Defined for lens-cube module
lensCubeErrorsForQuery = [
{
errorCode = 3001
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Syntax Error: %s"
}
{
errorCode = 3002
httpStatusCode = ${BAD_REQUEST}
errorMsg = "%s. Please remove conflicting fields and try again."
payloadClass = org.apache.lens.cube.error.ConflictingFields
}
{
errorCode = 3003
httpStatusCode = ${BAD_REQUEST}
errorMsg = "More than one cube accessed in query : %s and %s"
}
{
errorCode = 3004
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Neither cube nor dimensions accessed in the query"
}
{
errorCode = 3005
httpStatusCode = ${BAD_REQUEST}
errorMsg = "No timerange filter specified"
}
{
errorCode = 3006
httpStatusCode = ${BAD_REQUEST}
errorMsg = "%s is not timed dimension"
}
{
errorCode = 3007
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Error in parsing input date format. Expected format %s, date provided %s"
}
{
errorCode = 3008
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Date value cannot be null or empty"
}
{
errorCode = 3009
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Invalid time unit %s"
}
{
errorCode = 3010
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Selecting all columns is not supported"
}
{
errorCode = 3011
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Ambiguous column %s, in dimensions %s and %s"
}
{
errorCode = 3012
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Ambiguous column %s, in cube: %s and in dimension: %s"
}
{
errorCode = 3013
httpStatusCode = ${BAD_REQUEST}
errorMsg = "%s : Not a cube column"
}
{
errorCode = 3014
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Invalid time range"
}
{
errorCode = 3015
httpStatusCode = ${BAD_REQUEST}
errorMsg = "From date: %s should be smaller than to date: %s"
}
{
errorCode = 3016
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Join target table: %s is neither dimension nor cube"
}
{
errorCode = 3017
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Configured timerange writer cannot be used. Reason %s"
}
{
errorCode = 3018
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Default aggregate is not set for measure: %s"
}
{
errorCode = 3019
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Expression %s is not available in any fact"
}
{
errorCode = 3020
httpStatusCode = ${BAD_REQUEST}
errorMsg = "No join condition available"
}
{
errorCode = 3021
httpStatusCode = ${BAD_REQUEST}
errorMsg = "No join path defined from %s to %s"
}
{
errorCode = 3022
httpStatusCode = ${BAD_REQUEST}
errorMsg = "%s can only be queried %s. Please adjust the selected time range accordingly."
payloadClass = org.apache.lens.cube.error.ColUnAvailableInTimeRange
}
{
errorCode = 3023
httpStatusCode = ${BAD_REQUEST}
errorMsg = "No dimension table has the queried columns for %s, columns: %s"
}
{
errorCode = 3024
httpStatusCode = ${BAD_REQUEST}
errorMsg = "No fact table has the queried columns : %s"
}
{
errorCode = 3025
httpStatusCode = ${BAD_REQUEST}
errorMsg = "No reference column available for : %s "
}
{
errorCode = 3026
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Could not find the table containing column: %s"
}
{
errorCode = 3027
httpStatusCode = ${BAD_REQUEST}
errorMsg = "No candidate dimension table available to answer the query, because %s"
}
{
errorCode = 3028
httpStatusCode = ${BAD_REQUEST}
errorMsg = "No candidate fact table available to answer the query, because %s"
}
{
errorCode = 3029
httpStatusCode = ${BAD_REQUEST}
errorMsg = "No candidate dimension storage tables for dimension because %s"
}
{
errorCode = 3030
httpStatusCode = ${BAD_REQUEST}
errorMsg = "No storage table available for candidate fact: %s"
}
{
errorCode = 3031
httpStatusCode = ${BAD_REQUEST}
errorMsg = "The query is answerable from two storages but union is disabled."
}
{
errorCode = 3032
httpStatusCode = ${INTERNAL_SERVER_ERROR}
errorMsg = "Could not parse expression %s"
}
{
errorCode = 3033
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Could not find queried table or chain: %s"
}
{
errorCode = 3034
httpStatusCode = ${BAD_REQUEST}
errorMsg = "%s does not have any facts that can cover the requested time range : %s and queried measure set : %s"
}
{
errorCode = 3035
httpStatusCode = ${BAD_REQUEST}
errorMsg = "%s does not have any facts that can cover the queried measure set : %s"
}
]
lensCubeErrorsForMetastore = [
{
errorCode = 3101
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Problem in submitting entity: %s"
}
{
errorCode = 3102
httpStatusCode = ${BAD_REQUEST}
errorMsg = "No timeline found for fact=%s, storage=%s, update period=%s, partition column=%s."
}
{
errorCode = 3103
httpStatusCode = ${BAD_REQUEST}
errorMsg = "The Expression %s is Not Parsable."
}
{
errorCode = 3104
httpStatusCode = ${NOT_FOUND}
errorMsg = "%s %s Not found."
}
]
lensDriverErrors = [
{
errorCode = 4001
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Semantic Error : %s"
}
{
errorCode = 4002
httpStatusCode = ${INTERNAL_SERVER_ERROR}
errorMsg = "Driver Execution Error : %s"
}
]
lensCubeErrors = ${lensCubeErrorsForQuery}${lensCubeErrorsForMetastore}
lensSchedulerErrors = [
{
errorCode = 5001
httpStatusCode = ${INTERNAL_SERVER_ERROR}
errorMsg = "Can't submit the job %s"
}
{
errorCode = 5002
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Invalid event %s on current state %s for job %s"
}
{
errorCode = 5003
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Invalid event %s, for state %s of job instance %s of job %s"
}
{
errorCode = 5004
httpStatusCode = ${BAD_REQUEST}
errorMsg = "The current user %s for session %s is not the same as job owner %s"
}
{
errorCode = 5005
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Job with handle %s is not scheduled. The current state of job is %s"
}
{
errorCode = 5006
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Job instance with handle %s of job %s is not yet run"
}
{
errorCode = 5007
httpStatusCode = ${INTERNAL_SERVER_ERROR}
errorMsg = "Cannot update %s with handle %s"
}
{
errorCode = 5008
httpStatusCode = ${INTERNAL_SERVER_ERROR}
errorMsg = "Cannot %s job in AlarmService with handle %s"
}
{
errorCode = 5009
httpStatusCode = ${BAD_REQUEST}
errorMsg = "Cannot submit the job because user already has %d scheduled jobs"
}
]
# Overriding errors in lens-errors.conf via lens-errors-override.conf:
#
# Step 1: Copy contents of lens-errors.conf to lens-errors-override.conf
# Step 2: Modify the error objects to be changed.
#
# lens-errors-override.conf can be deployed via any debian. However, it should be available on lens server and
# lens-client class path. Lens client has to be aware of error payload classes defined with errors in configuration
# files to unmarshall the error payloads propagated with errors. lens-errors-override.conf is an optional file and it
# is not mandatory to be present in classpath.
#
# Error object preferrence rule: If an error object with same error code is defined multiple times within same array
# or different arrays, then the error object defined later will completely override the object defined earlier.
# Two error objects are considered same when they have same error code. This is done to ensure that there is only one
# error configuration per error code.
# Adding more errors via lens-errors-override.conf:
#
# Pluggable code in lens which is not shipped with lens distribution can define new errors using
# lens-errors-override.conf.
#
# E.g.: Say pluggable code has new errors collection named lensXyzErrors to be configured.
#
# Step 1: Copy contents of lens-errors.conf to lens-errors-override.conf
# Step 2: Define lensXyzErrors before defining errors property.
# Step 3: Append it to the end of errors property as shown below.
# errors = ${lensCommonErrors}${lensServerErrors}${lensCubeErrors}${lensXyzErrors}
# Prepare errors array for Lens server and Lens client.
# Lens server and Lens client are only aware of errors array. They are not aware of any other array defined in
# error configuration files. Hence an errors array is prepared which is a concatenation of all other error arrays.
errors = ${lensCommonErrors}${lensServerErrors}${lensCubeErrors}${lensDriverErrors}${lensSchedulerErrors}