phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-174) Zookeeper parameter in Phoenix JDBC URL should be optional as it can be specified in hbase-site.xml
Date Thu, 23 Apr 2015 03:28:38 GMT


ASF GitHub Bot commented on PHOENIX-174:

Github user JamesRTaylor commented on a diff in the pull request:
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/schema/json/ ---
    @@ -0,0 +1,216 @@
    +package org.apache.phoenix.schema.json;
    +import java.sql.SQLException;
    +import org.apache.hadoop.hbase.util.Bytes;
    +import org.codehaus.jackson.JsonFactory;
    +import org.codehaus.jackson.JsonNode;
    +import org.codehaus.jackson.JsonParseException;
    +import org.codehaus.jackson.JsonParser;
    +import org.codehaus.jackson.JsonParser.Feature;
    +import org.codehaus.jackson.node.ValueNode;
    + * The {@link PhoenixJson} wraps json and uses Jackson library to parse and traverse
the json. It
    + * should be used to represent the JSON data type and also should be used to parse Json
data and
    + * read the value from it. It always conside the last value if same key exist more than
    + */
    +public class PhoenixJson {
    +    private final JsonNode node;
    +    private String jsonAsString;
    +    /**
    +     * Static Factory method to get an {@link PhoenixJson} object. It also validates
the json and
    +     * throws {@link JsonParseException} if it is invalid with line number and character,
    +     * should be wrapped in {@link SQLException} by caller.
    +     * @param data Buffer that contains data to parse
    +     * @param offset Offset of the first data byte within buffer
    +     * @param length Length of contents to parse within buffer
    +     * @return {@link PhoenixJson}.
    +     * @throws JsonParseException
    +     * @throws IOException
    +     */
    +    public static PhoenixJson getPhoenixJson(byte[] jsonData, int offset, int length)
    +            throws JsonParseException, IOException {
    --- End diff --
    Probably best to throw a SQLException here with the JsonParseException or IOException
nested inside. Perhaps create an INVALID_JSON_DATA exception in SQLExceptionCode that you
can use for the JsonParseException.

> Zookeeper parameter in Phoenix JDBC URL should be optional as it can be specified in
> ---------------------------------------------------------------------------------------------------
>                 Key: PHOENIX-174
>                 URL:
>             Project: Phoenix
>          Issue Type: Task
>    Affects Versions: 1.1
>            Reporter: mujtaba
>              Labels: enhancement
> Currently, value from HBase zookeeper/port specified in Phoenix JDBC URL overrides the
value specified in hbase-site.xml. Override is fine, but it should use value specified in
hbase-site.xml if no value is specified in phoenix JDBC URL i.e. to make this parameter optional.

This message was sent by Atlassian JIRA

View raw message