gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GORA-535) Add a data store for Apache Ignite
Date Mon, 20 Aug 2018 12:08:00 GMT

    [ https://issues.apache.org/jira/browse/GORA-535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16585841#comment-16585841
] 

ASF GitHub Bot commented on GORA-535:
-------------------------------------

Github user djkevincr commented on a diff in the pull request:

    https://github.com/apache/gora/pull/134#discussion_r211237792
  
    --- Diff: gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteParameters.java
---
    @@ -0,0 +1,140 @@
    +/*
    + * 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.
    + */
    +package org.apache.gora.ignite.store;
    +
    +import java.util.Properties;
    +import org.apache.gora.ignite.utils.IgniteBackendConstants;
    +import org.apache.hadoop.conf.Configuration;
    +
    +/**
    + * Parameters definitions for Ignite.
    + */
    +public class IgniteParameters {
    +
    +  /**
    +   * Property indicating the Ignite Schema to be used
    +   */
    +  public static final String PROP_SCHEMA = "gora.datastore.ignite.schema";
    +
    +  /**
    +   * Property indicating the Ignite Cluster Node IP
    +   */
    +  public static final String PROP_HOST = "gora.datastore.ignite.host";
    +
    +  /**
    +   * Property indicating the port used by the Ignite Server
    +   */
    +  public static final String PROP_PORT = "gora.datastore.ignite.port";
    +
    +  /**
    +   * Property indicating the username to connect to the server
    +   */
    +  public static final String PROP_USER = "gora.datastore.ignite.user";
    +
    +  /**
    +   * Property indicating the password to connect to the server
    +   */
    +  public static final String PROP_PASSWORD = "gora.datastore.ignite.password";
    +
    +  /**
    +   * Property indicating additional JDBC options
    +   */
    +  public static final String PROP_ADDITIONALS = "gora.datastore.ignite.additionalConfigurations";
    +
    +  private String host;
    +  private String port;
    +  private String schema;
    +  private String user;
    +  private String password;
    +  private String additionalConfigurations;
    +
    +  /**
    +   * @param host Hostname/IP of the Ignite Server
    +   * @param port Optional port for Ignite Server
    +   * @param user Optional username for Ignite
    +   * @param password Optional password for Ignite
    +   * @param additionalConfigurations Optional additional configurations for
    +   * Ignite
    +   */
    +  private IgniteParameters(String host, String port, String schema, String user, String
password, String additionalConfigurations) {
    +    this.host = host;
    +    this.port = port;
    +    this.schema = schema;
    +    this.user = user;
    +    this.password = password;
    +    this.additionalConfigurations = additionalConfigurations;
    +  }
    +
    +  public String getHost() {
    +    return host;
    +  }
    +
    +  public void setHost(String host) {
    +    this.host = host;
    +  }
    +
    +  public String getPort() {
    +    return port;
    +  }
    +
    +  public void setPort(String port) {
    +    this.port = port;
    +  }
    +
    +  public String getUser() {
    +    return user;
    +  }
    +
    +  public void setUser(String user) {
    +    this.user = user;
    +  }
    +
    +  public String getPassword() {
    +    return password;
    +  }
    +
    +  public void setPassword(String password) {
    +    this.password = password;
    +  }
    +
    +  public String getAdditionalConfigurations() {
    +    return additionalConfigurations;
    +  }
    +
    +  public void setAdditionalConfigurations(String additionalConfigurations) {
    +    this.additionalConfigurations = additionalConfigurations;
    +  }
    +
    +  public String getSchema() {
    +    return schema;
    +  }
    +
    +  public void setSchema(String schema) {
    +    this.schema = schema;
    +  }
    +
    +  public static IgniteParameters load(Properties properties) {
    +    return new IgniteParameters(
    +        properties.getProperty(PROP_HOST, IgniteBackendConstants.DEFAULT_IGNITE_HOST),
    +        properties.getProperty(PROP_PORT, IgniteBackendConstants.DEFAULT_IGNITE_PORT),
    +        properties.getProperty(PROP_SCHEMA, null),
    +        properties.getProperty(PROP_USER, null),
    +        properties.getProperty(PROP_PASSWORD, null),
    --- End diff --
    
    Is it required to add null value as the default value, since it will return null if key
is not exist in the properties. Another point is, have you handled the null value for a non
existing key in higher layer when they are referred from IgniteParameters. Check whether you
end up in null pointer exception if one of these properties are not included in properties
file.


> Add a data store for Apache Ignite 
> -----------------------------------
>
>                 Key: GORA-535
>                 URL: https://issues.apache.org/jira/browse/GORA-535
>             Project: Apache Gora
>          Issue Type: New Feature
>            Reporter: Nishadi Kirielle
>            Priority: Major
>              Labels: gsoc2018
>
> Currently, Gora has support for persisting objects to various database models such as
Apache Hbase, Apache Cassandra and much more. [1] This project aims to extend its capability
to provide support for Apache Ignite database.
> Apache Ignite is a distributed database, caching and processing platform.[2] 
> [1]. [http://gora.apache.org/] 
> [2] . [https://ignite.apache.org/]
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message