[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316980930
 
 

 ##
 File path: gora-kudu/src/main/java/org/apache/gora/kudu/store/KuduStore.java
 ##
 @@ -0,0 +1,654 @@
+/*
+ * 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.kudu.store;
+
+import org.apache.gora.kudu.query.KuduResult;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.invoke.MethodHandles;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
+import org.apache.gora.kudu.mapping.Column;
+import org.apache.gora.kudu.mapping.KuduMapping;
+import org.apache.gora.kudu.mapping.KuduMappingBuilder;
+import org.apache.gora.kudu.utils.KuduParameters;
+import org.apache.gora.persistency.impl.PersistentBase;
+import org.apache.gora.query.PartitionQuery;
+import org.apache.gora.query.Query;
+import org.apache.gora.query.Result;
+import org.apache.gora.store.impl.DataStoreBase;
+import org.apache.gora.util.AvroUtils;
+import org.apache.gora.util.GoraException;
+import org.apache.kudu.ColumnSchema;
+import org.apache.avro.Schema;
+import org.apache.avro.specific.SpecificDatumReader;
+import org.apache.avro.specific.SpecificDatumWriter;
+import org.apache.avro.util.Utf8;
+import org.apache.gora.kudu.query.KuduQuery;
+import org.apache.gora.kudu.utils.KuduClientUtils;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.query.impl.PartitionQueryImpl;
+import org.apache.gora.util.IOUtils;
+import org.apache.kudu.Type;
+import org.apache.kudu.client.CreateTableOptions;
+import org.apache.kudu.client.Delete;
+import org.apache.kudu.client.KuduClient;
+import org.apache.kudu.client.KuduException;
+import org.apache.kudu.client.KuduPredicate;
+import org.apache.kudu.client.KuduScanner;
+import org.apache.kudu.client.KuduSession;
+import org.apache.kudu.client.KuduTable;
+import org.apache.kudu.client.OperationResponse;
+import org.apache.kudu.client.PartialRow;
+import org.apache.kudu.client.RowResult;
+import org.apache.kudu.client.RowResultIterator;
+import org.apache.kudu.client.SessionConfiguration;
+import org.apache.kudu.client.Update;
+import org.apache.kudu.client.Upsert;
+import org.apache.kudu.util.DecimalUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Implementation of a Apache Kudu data store to be used by Apache Gora.
+ *
+ * @param  class to be used for the key
+ * @param  class to be persisted within the store
+ */
+public class KuduStore extends DataStoreBase {
+
+  private static final Logger LOG = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+  private static final String PARSE_MAPPING_FILE_KEY = 
"gora.kudu.mapping.file";
+  private static final String DEFAULT_MAPPING_FILE = "gora-kudu-mapping.xml";
+  private static final String XML_MAPPING_DEFINITION = "gora.mapping";
+  private KuduMapping kuduMapping;
+  private KuduClient client;
+  private KuduSession session;
 
 Review comment:
   Hi @djkevincr 
   It sounds good. I will not change the code for now and I will send a mail to 
the Kudu mailing list.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316975353
 
 

 ##
 File path: gora-kudu/src/main/java/org/apache/gora/kudu/store/KuduStore.java
 ##
 @@ -0,0 +1,654 @@
+/*
+ * 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.kudu.store;
+
+import org.apache.gora.kudu.query.KuduResult;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.invoke.MethodHandles;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
+import org.apache.gora.kudu.mapping.Column;
+import org.apache.gora.kudu.mapping.KuduMapping;
+import org.apache.gora.kudu.mapping.KuduMappingBuilder;
+import org.apache.gora.kudu.utils.KuduParameters;
+import org.apache.gora.persistency.impl.PersistentBase;
+import org.apache.gora.query.PartitionQuery;
+import org.apache.gora.query.Query;
+import org.apache.gora.query.Result;
+import org.apache.gora.store.impl.DataStoreBase;
+import org.apache.gora.util.AvroUtils;
+import org.apache.gora.util.GoraException;
+import org.apache.kudu.ColumnSchema;
+import org.apache.avro.Schema;
+import org.apache.avro.specific.SpecificDatumReader;
+import org.apache.avro.specific.SpecificDatumWriter;
+import org.apache.avro.util.Utf8;
+import org.apache.gora.kudu.query.KuduQuery;
+import org.apache.gora.kudu.utils.KuduClientUtils;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.query.impl.PartitionQueryImpl;
+import org.apache.gora.util.IOUtils;
+import org.apache.kudu.Type;
+import org.apache.kudu.client.CreateTableOptions;
+import org.apache.kudu.client.Delete;
+import org.apache.kudu.client.KuduClient;
+import org.apache.kudu.client.KuduException;
+import org.apache.kudu.client.KuduPredicate;
+import org.apache.kudu.client.KuduScanner;
+import org.apache.kudu.client.KuduSession;
+import org.apache.kudu.client.KuduTable;
+import org.apache.kudu.client.OperationResponse;
+import org.apache.kudu.client.PartialRow;
+import org.apache.kudu.client.RowResult;
+import org.apache.kudu.client.RowResultIterator;
+import org.apache.kudu.client.SessionConfiguration;
+import org.apache.kudu.client.Update;
+import org.apache.kudu.client.Upsert;
+import org.apache.kudu.util.DecimalUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Implementation of a Apache Kudu data store to be used by Apache Gora.
+ *
+ * @param  class to be used for the key
+ * @param  class to be persisted within the store
+ */
+public class KuduStore extends DataStoreBase {
+
+  private static final Logger LOG = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+  private static final String PARSE_MAPPING_FILE_KEY = 
"gora.kudu.mapping.file";
+  private static final String DEFAULT_MAPPING_FILE = "gora-kudu-mapping.xml";
+  private static final String XML_MAPPING_DEFINITION = "gora.mapping";
+  private KuduMapping kuduMapping;
+  private KuduClient client;
+  private KuduSession session;
 
 Review comment:
   I could not find a polling mechanism. I will follow your suggestion and use 
a new object on a per operation basis. Also, I will ask for help to the Kudu 
community.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316972099
 
 

 ##
 File path: pom.xml
 ##
 @@ -1642,16 +1676,16 @@
 
   
   
-  org.apache.pig
-  pig
-  h2
-  ${pig.version}
-  
-  
-  org.apache.avro
-  avro
-  
-  
+org.apache.pig
 
 Review comment:
   It is a code format issue for this part of the xml file. I will try to 
revert this.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316971789
 
 

 ##
 File path: 
gora-kudu/src/test/java/org/apache/gora/kudu/mapreduce/KuduStoreMapReduceTest.java
 ##
 @@ -0,0 +1,77 @@
+/*
+ * 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.kudu.mapreduce;
+
+import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.apache.gora.examples.generated.WebPage;
+import org.apache.gora.kudu.GoraKuduTestDriver;
+import org.apache.gora.kudu.utils.KuduBackendConstants;
+import org.apache.gora.mapreduce.DataStoreMapReduceTestBase;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.hadoop.mapred.JobConf;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
 Review comment:
   +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316971687
 
 

 ##
 File path: 
gora-kudu/src/test/java/org/apache/gora/kudu/mapreduce/KuduStoreMapReduceTest.java
 ##
 @@ -0,0 +1,77 @@
+/*
+ * 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.kudu.mapreduce;
+
+import java.io.IOException;
+import java.util.logging.Level;
 
 Review comment:
   +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316971740
 
 

 ##
 File path: 
gora-kudu/src/test/java/org/apache/gora/kudu/mapreduce/KuduStoreMapReduceTest.java
 ##
 @@ -0,0 +1,77 @@
+/*
+ * 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.kudu.mapreduce;
+
+import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 Review comment:
   +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316971644
 
 

 ##
 File path: 
gora-kudu/src/main/java/org/apache/gora/kudu/utils/KuduParameters.java
 ##
 @@ -0,0 +1,217 @@
+/*
+ * 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.kudu.utils;
+
+import java.util.Properties;
+import org.apache.hadoop.conf.Configuration;
+
+/**
+ * Parameters definitions for Kudu.
+ */
+public class KuduParameters {
+
+  private String masterAddresses;
+  private Integer bossCount;
+  private Long defaultAdminOperationTimeoutMs;
+  private Long defaultOperationTimeoutMs;
+  private Long defaultSocketReadTimeoutMs;
+  private Boolean clientStatistics;
+  private Integer workerCount;
+  private String flushMode;
+  private Integer flushInterval;
+
+  public KuduParameters(String masterAddresses) {
+this.masterAddresses = masterAddresses;
+  }
+
+  public String getMasterAddresses() {
+return masterAddresses;
+  }
+
+  /**
+   * Set list of masters
+   *
+   * @param masterAddresses comma-separated list of "host:port" pairs of the
+   * masters
+   */
+  public void setMasterAddresses(String masterAddresses) {
 
 Review comment:
   +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316971247
 
 

 ##
 File path: gora-kudu/src/main/java/org/apache/gora/kudu/store/KuduStore.java
 ##
 @@ -0,0 +1,654 @@
+/*
+ * 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.kudu.store;
+
+import org.apache.gora.kudu.query.KuduResult;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.invoke.MethodHandles;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.ConcurrentHashMap;
+import org.apache.gora.kudu.mapping.Column;
+import org.apache.gora.kudu.mapping.KuduMapping;
+import org.apache.gora.kudu.mapping.KuduMappingBuilder;
+import org.apache.gora.kudu.utils.KuduParameters;
+import org.apache.gora.persistency.impl.PersistentBase;
+import org.apache.gora.query.PartitionQuery;
+import org.apache.gora.query.Query;
+import org.apache.gora.query.Result;
+import org.apache.gora.store.impl.DataStoreBase;
+import org.apache.gora.util.AvroUtils;
+import org.apache.gora.util.GoraException;
+import org.apache.kudu.ColumnSchema;
+import org.apache.avro.Schema;
+import org.apache.avro.specific.SpecificDatumReader;
+import org.apache.avro.specific.SpecificDatumWriter;
+import org.apache.avro.util.Utf8;
+import org.apache.gora.kudu.query.KuduQuery;
+import org.apache.gora.kudu.utils.KuduClientUtils;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.query.impl.PartitionQueryImpl;
+import org.apache.gora.util.IOUtils;
+import org.apache.kudu.Type;
+import org.apache.kudu.client.CreateTableOptions;
+import org.apache.kudu.client.Delete;
+import org.apache.kudu.client.KuduClient;
+import org.apache.kudu.client.KuduException;
+import org.apache.kudu.client.KuduPredicate;
+import org.apache.kudu.client.KuduScanner;
+import org.apache.kudu.client.KuduSession;
+import org.apache.kudu.client.KuduTable;
+import org.apache.kudu.client.OperationResponse;
+import org.apache.kudu.client.PartialRow;
+import org.apache.kudu.client.RowResult;
+import org.apache.kudu.client.RowResultIterator;
+import org.apache.kudu.client.SessionConfiguration;
+import org.apache.kudu.client.Update;
+import org.apache.kudu.client.Upsert;
+import org.apache.kudu.util.DecimalUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Implementation of a Apache Kudu data store to be used by Apache Gora.
+ *
+ * @param  class to be used for the key
+ * @param  class to be persisted within the store
+ */
+public class KuduStore extends DataStoreBase {
+
+  private static final Logger LOG = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+  private static final String PARSE_MAPPING_FILE_KEY = 
"gora.kudu.mapping.file";
+  private static final String DEFAULT_MAPPING_FILE = "gora-kudu-mapping.xml";
+  private static final String XML_MAPPING_DEFINITION = "gora.mapping";
+  private KuduMapping kuduMapping;
+  private KuduClient client;
+  private KuduSession session;
+  private KuduTable table;
+
+  private static final ConcurrentHashMap> 
readerMap = new ConcurrentHashMap<>();
+  private static final ConcurrentHashMap> 
writerMap = new ConcurrentHashMap<>();
+
+  @Override
+  public void initialize(Class keyClass, Class persistentClass, 
Properties properties) throws GoraException {
+try {
+  super.initialize(keyClass, persistentClass, properties);
+  KuduMappingBuilder builder = new KuduMappingBuilder<>(this);
+  InputStream mappingStream;
+  if (properties.containsKey(XML_MAPPING_DEFINITION)) {
+if (LOG.isTraceEnabled()) {
+  LOG.trace("{} = {}", XML_MAPPING_DEFINITION, 
properties.getProperty(XML_MAPPING_DEFINITION));
+}
+mappingStream = 
org.apache.commons.io.IOUtils.toInputStream(properties.getProperty(XML_MAPPING_DEFINITION),
 (Charset) null);
+  } else {
+mappingStream = 
getClass().getClassLoader().getResourceAsStream(getConf().get(PARSE_MAPPING_FILE_KEY,
 DEFAULT_MAPPING_FILE));
+  }
+  

[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316968538
 
 

 ##
 File path: 
gora-kudu/src/main/java/org/apache/gora/kudu/mapping/KuduMappingBuilder.java
 ##
 @@ -0,0 +1,170 @@
+/*
+ * 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.kudu.mapping;
+
+import com.google.inject.ConfigurationException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.invoke.MethodHandles;
+import java.util.AbstractMap;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.gora.kudu.store.KuduStore;
+import org.apache.gora.persistency.impl.PersistentBase;
+import org.apache.gora.util.GoraException;
+import org.apache.kudu.Type;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Builder for Mapping definitions of Kudu.
+ */
+public class KuduMappingBuilder {
+  
+  private static final Logger LOG = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+  /**
+   * Mapping instance being built
+   */
+  private KuduMapping kuduMapping;
+  
+  private final KuduStore dataStore;
+
+  /**
+   * Constructor for KuduMappingBuilder
+   *
+   * @param store KuduStore instance
+   */
+  public KuduMappingBuilder(final KuduStore store) {
+this.kuduMapping = new KuduMapping();
+this.dataStore = store;
+  }
+
+  /**
+   * Returns the Kudu Mapping being built
+   *
+   * @return Kudu Mapping instance
+   */
+  public KuduMapping getKuduMapping() {
+return kuduMapping;
+  }
+
+  /**
+   * Sets the Kudu Mapping
+   *
+   * @param kuduMapping Kudu Mapping instance
+   */
+  public void setKuduMapping(KuduMapping kuduMapping) {
+this.kuduMapping = kuduMapping;
+  }
+
+  /**
+   * Reads Kudu mappings from file
+   *
+   * @param inputStream Mapping input stream
+   */
+  public void readMappingFile(InputStream inputStream) throws GoraException {
+try {
+  SAXBuilder saxBuilder = new SAXBuilder();
+  if (inputStream == null) {
+LOG.error("The mapping input stream is null!");
+throw new GoraException("The mapping input stream is null!");
+  }
+  Document document = saxBuilder.build(inputStream);
+  if (document == null) {
+LOG.error("The mapping document is null!");
+throw new GoraException("The mapping document is null!");
+  }
+  @SuppressWarnings("unchecked")
+  List classes = document.getRootElement().getChildren("class");
+  for (Element classElement : classes) {
+if (classElement.getAttributeValue("keyClass").equals(
+dataStore.getKeyClass().getCanonicalName())
+&& classElement.getAttributeValue("name").equals(
+dataStore.getPersistentClass().getCanonicalName())) {
+  final String tableNameFromMapping = 
classElement.getAttributeValue("table");
+  final String tablenumReplicasMapping = 
classElement.getAttributeValue("numReplicas");
+  String tableName = dataStore.getSchemaName(tableNameFromMapping, 
dataStore.getPersistentClass());
+  kuduMapping.setTableName(tableName);
+  
kuduMapping.setNumReplicas(Integer.parseInt(tablenumReplicasMapping));
+  @SuppressWarnings("unchecked")
+  List tables = 
document.getRootElement().getChildren("table");
+  for (Element tableElement : tables) {
+if 
(tableElement.getAttributeValue("name").equals(tableNameFromMapping)) {
+  @SuppressWarnings("unchecked")
+  List prColumns = tableElement.getChildren("primaryKey");
+  List prFields = new ArrayList<>();
+  for (Element aPrimaryKey : prColumns) {
+String name = aPrimaryKey.getAttributeValue("column");
+String type = aPrimaryKey.getAttributeValue("type");
+Type aDataType = Type.valueOf(type);
+if (aDataType == Type.DECIMAL) {
+  int precision = 

[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316968344
 
 

 ##
 File path: gora-kudu/src/main/java/org/apache/gora/kudu/query/KuduResult.java
 ##
 @@ -0,0 +1,86 @@
+/*
+ * 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.kudu.query;
+
+import java.io.IOException;
+import org.apache.gora.kudu.store.KuduStore;
+import org.apache.gora.persistency.impl.PersistentBase;
+import org.apache.gora.query.Query;
+import org.apache.gora.query.impl.ResultBase;
+import org.apache.gora.store.DataStore;
+import org.apache.kudu.client.KuduScanner;
+import org.apache.kudu.client.RowResult;
+import org.apache.kudu.client.RowResultIterator;
+
+/**
+ * KuduResult specific implementation of the
+ * {@link org.apache.gora.query.Result} interface.
+ */
+public class KuduResult extends ResultBase {
+
+  private final KuduScanner result;
+  private RowResultIterator resultIt;
+
+  public KuduResult(DataStore dataStore, Query query, KuduScanner 
result) {
+super(dataStore, query);
+this.result = result;
+  }
+
+  @Override
+  protected boolean nextInner() throws IOException {
+boolean more = false;
 
 Review comment:
   +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316968274
 
 

 ##
 File path: gora-kudu/src/main/java/org/apache/gora/kudu/query/KuduResult.java
 ##
 @@ -0,0 +1,86 @@
+/*
+ * 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.kudu.query;
+
+import java.io.IOException;
+import org.apache.gora.kudu.store.KuduStore;
+import org.apache.gora.persistency.impl.PersistentBase;
+import org.apache.gora.query.Query;
+import org.apache.gora.query.impl.ResultBase;
+import org.apache.gora.store.DataStore;
+import org.apache.kudu.client.KuduScanner;
+import org.apache.kudu.client.RowResult;
+import org.apache.kudu.client.RowResultIterator;
+
+/**
+ * KuduResult specific implementation of the
+ * {@link org.apache.gora.query.Result} interface.
+ */
+public class KuduResult extends ResultBase {
+
+  private final KuduScanner result;
+  private RowResultIterator resultIt;
+
+  public KuduResult(DataStore dataStore, Query query, KuduScanner 
result) {
+super(dataStore, query);
+this.result = result;
+  }
+
+  @Override
+  protected boolean nextInner() throws IOException {
 
 Review comment:
   +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316968099
 
 

 ##
 File path: gora-kudu/src/main/java/org/apache/gora/kudu/query/KuduQuery.java
 ##
 @@ -0,0 +1,36 @@
+/*
+ * 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.kudu.query;
+
+import org.apache.gora.persistency.impl.PersistentBase;
+import org.apache.gora.query.Query;
+import org.apache.gora.query.impl.QueryBase;
+import org.apache.gora.store.DataStore;
+
+/**
+ * Kudu specific implementation of the {@link Query} interface.
+ */
+public class KuduQuery extends QueryBase {
+
+  public KuduQuery(DataStore dataStore) {
+super(dataStore);
+  }
+
+  public KuduQuery() {
 
 Review comment:
   +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316967792
 
 

 ##
 File path: gora-kudu/src/main/java/org/apache/gora/kudu/mapping/Column.java
 ##
 @@ -0,0 +1,161 @@
+/*
+ * 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.kudu.mapping;
+
+import org.apache.kudu.Type;
+
+public class Column {
+
+  private String name;
+  private FieldType dataType;
+
+  /**
+   * Constructor for Column
+   *
+   * @param name Column's name
+   * @param dataType Column's data type
+   */
+  public Column(String name, FieldType dataType) {
+this.name = name;
+this.dataType = dataType;
+  }
+
+  /**
+   * Returns the column's name
+   *
+   * @return Column's name
+   */
+  public String getName() {
+return name;
+  }
+
+  /**
+   * Sets the column's name
+   *
+   * @param name Column's name
+   */
+  public void setName(String name) {
+this.name = name;
+  }
+
+  /**
+   * Returns the column's data-type
+   *
+   * @return Column's data-type
+   */
+  public FieldType getDataType() {
+return dataType;
+  }
+
+  /**
+   * Sets the column's data-type
+   *
+   * @param dataType Column's data-type
+   */
+  public void setDataType(FieldType dataType) {
 
 Review comment:
   +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316967862
 
 

 ##
 File path: 
gora-kudu/src/main/java/org/apache/gora/kudu/mapping/KuduMappingBuilder.java
 ##
 @@ -0,0 +1,170 @@
+/*
+ * 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.kudu.mapping;
+
+import com.google.inject.ConfigurationException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.invoke.MethodHandles;
+import java.util.AbstractMap;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.gora.kudu.store.KuduStore;
+import org.apache.gora.persistency.impl.PersistentBase;
+import org.apache.gora.util.GoraException;
+import org.apache.kudu.Type;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Builder for Mapping definitions of Kudu.
+ */
+public class KuduMappingBuilder {
+  
+  private static final Logger LOG = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+  /**
+   * Mapping instance being built
+   */
+  private KuduMapping kuduMapping;
+  
+  private final KuduStore dataStore;
+
+  /**
+   * Constructor for KuduMappingBuilder
+   *
+   * @param store KuduStore instance
+   */
+  public KuduMappingBuilder(final KuduStore store) {
+this.kuduMapping = new KuduMapping();
+this.dataStore = store;
+  }
+
+  /**
+   * Returns the Kudu Mapping being built
+   *
+   * @return Kudu Mapping instance
+   */
+  public KuduMapping getKuduMapping() {
+return kuduMapping;
+  }
+
+  /**
+   * Sets the Kudu Mapping
+   *
+   * @param kuduMapping Kudu Mapping instance
+   */
+  public void setKuduMapping(KuduMapping kuduMapping) {
 
 Review comment:
   +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316967768
 
 

 ##
 File path: gora-kudu/src/main/java/org/apache/gora/kudu/mapping/Column.java
 ##
 @@ -0,0 +1,161 @@
+/*
+ * 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.kudu.mapping;
+
+import org.apache.kudu.Type;
+
+public class Column {
+
+  private String name;
+  private FieldType dataType;
+
+  /**
+   * Constructor for Column
+   *
+   * @param name Column's name
+   * @param dataType Column's data type
+   */
+  public Column(String name, FieldType dataType) {
+this.name = name;
+this.dataType = dataType;
+  }
+
+  /**
+   * Returns the column's name
+   *
+   * @return Column's name
+   */
+  public String getName() {
+return name;
+  }
+
+  /**
+   * Sets the column's name
+   *
+   * @param name Column's name
+   */
+  public void setName(String name) {
+this.name = name;
+  }
+
+  /**
+   * Returns the column's data-type
+   *
+   * @return Column's data-type
+   */
+  public FieldType getDataType() {
+return dataType;
+  }
+
+  /**
+   * Sets the column's data-type
+   *
+   * @param dataType Column's data-type
+   */
+  public void setDataType(FieldType dataType) {
+this.dataType = dataType;
+  }
+
+  /**
+   * Kudu supported data-type enumeration. For a more detailed list of data
+   * types supported by Kudu refer to
+   * https://kudu.apache.org/docs/schema_design.html#column-design
+   */
+  public static class FieldType {
+
+private int precision;
+private int scale;
+private Type type;
+
+/**
+ * Constructor for FieldType
+ *
+ * @param type Kudu's Type
+ */
+public FieldType(Type type) {
+  this.type = type;
+}
+
+/**
+ * Constructor for FieldType Implicitly uses a Decimal Kudu Type with
+ * precision and scale attributes
+ *
+ * @param precision Decimal precision
+ * @param scale Decimal scale
+ */
+public FieldType(int precision, int scale) {
+  this.type = Type.DECIMAL;
+  this.precision = precision;
+  this.scale = scale;
+}
+
+/**
+ * Returns the precision of a Decimal type
+ *
+ * @return Decimal column precision
+ */
+public int getPrecision() {
+  return precision;
+}
+
+/**
+ * Sets the decimal precision
+ *
+ * @param precision Decimal column precision
+ */
+public void setPrecision(int precision) {
+  this.precision = precision;
+}
+
+/**
+ * Returns the scale of a Decimal type
+ *
+ * @return Decimal column scale
+ */
+public int getScale() {
+  return scale;
+}
+
+/**
+ * Sets the decimal scale
+ *
+ * @param scale Decimal column scale
+ */
+public void setScale(int scale) {
 
 Review comment:
   +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316967779
 
 

 ##
 File path: gora-kudu/src/main/java/org/apache/gora/kudu/mapping/Column.java
 ##
 @@ -0,0 +1,161 @@
+/*
+ * 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.kudu.mapping;
+
+import org.apache.kudu.Type;
+
+public class Column {
+
+  private String name;
+  private FieldType dataType;
+
+  /**
+   * Constructor for Column
+   *
+   * @param name Column's name
+   * @param dataType Column's data type
+   */
+  public Column(String name, FieldType dataType) {
+this.name = name;
+this.dataType = dataType;
+  }
+
+  /**
+   * Returns the column's name
+   *
+   * @return Column's name
+   */
+  public String getName() {
+return name;
+  }
+
+  /**
+   * Sets the column's name
+   *
+   * @param name Column's name
+   */
+  public void setName(String name) {
+this.name = name;
+  }
+
+  /**
+   * Returns the column's data-type
+   *
+   * @return Column's data-type
+   */
+  public FieldType getDataType() {
+return dataType;
+  }
+
+  /**
+   * Sets the column's data-type
+   *
+   * @param dataType Column's data-type
+   */
+  public void setDataType(FieldType dataType) {
+this.dataType = dataType;
+  }
+
+  /**
+   * Kudu supported data-type enumeration. For a more detailed list of data
+   * types supported by Kudu refer to
+   * https://kudu.apache.org/docs/schema_design.html#column-design
+   */
+  public static class FieldType {
+
+private int precision;
+private int scale;
+private Type type;
+
+/**
+ * Constructor for FieldType
+ *
+ * @param type Kudu's Type
+ */
+public FieldType(Type type) {
+  this.type = type;
+}
+
+/**
+ * Constructor for FieldType Implicitly uses a Decimal Kudu Type with
+ * precision and scale attributes
+ *
+ * @param precision Decimal precision
+ * @param scale Decimal scale
+ */
+public FieldType(int precision, int scale) {
+  this.type = Type.DECIMAL;
+  this.precision = precision;
+  this.scale = scale;
+}
+
+/**
+ * Returns the precision of a Decimal type
+ *
+ * @return Decimal column precision
+ */
+public int getPrecision() {
+  return precision;
+}
+
+/**
+ * Sets the decimal precision
+ *
+ * @param precision Decimal column precision
+ */
+public void setPrecision(int precision) {
 
 Review comment:
   +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-22 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r316967318
 
 

 ##
 File path: gora-kudu/src/main/java/org/apache/gora/kudu/mapping/Column.java
 ##
 @@ -0,0 +1,161 @@
+/*
+ * 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.kudu.mapping;
+
+import org.apache.kudu.Type;
+
+public class Column {
 
 Review comment:
   +1


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-05 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r310878316
 
 

 ##
 File path: 
gora-core/src/examples/java/org/apache/gora/examples/generated/Employee.java
 ##
 @@ -649,6 +709,29 @@ public boolean isBossDirty() {
throw new java.lang.UnsupportedOperationException("IsDirty is not 
supported on tombstones");
  }

+ /**
 
 Review comment:
   This issue was addressed in 
[GORA-396](https://github.com/apache/gora/pull/174). Maybe I could rebuild the 
examples once that PR is merged.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-05 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r310878133
 
 

 ##
 File path: 
gora-cassandra/src/examples/java/org/apache/gora/cassandra/example/generated/AvroSerialization/CassandraRecord.java
 ##
 @@ -982,6 +996,7 @@ public void setDataInt(java.lang.Integer value) {
  
  /**
   * Checks the dirty status of the 'dataInt' field. A field is dirty 
if it represents a change that has not yet been written to the database.
+  * @param value the value to set.
 
 Review comment:
   This issue was addressed in 
[GORA-396](https://github.com/apache/gora/pull/174). Maybe I could rebuild the 
examples once that PR is merged.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-05 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r310878158
 
 

 ##
 File path: 
gora-cassandra/src/examples/java/org/apache/gora/cassandra/example/generated/AvroSerialization/CassandraRecord.java
 ##
 @@ -1004,6 +1019,7 @@ public void setDataLong(java.lang.Long value) {
  
  /**
   * Checks the dirty status of the 'dataLong' field. A field is dirty 
if it represents a change that has not yet been written to the database.
+  * @param value the value to set.
 
 Review comment:
   This issue was addressed in 
[GORA-396](https://github.com/apache/gora/pull/174). Maybe I could rebuild the 
examples once that PR is merged.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-05 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r310878074
 
 

 ##
 File path: 
gora-cassandra/src/examples/java/org/apache/gora/cassandra/example/generated/AvroSerialization/CassandraRecord.java
 ##
 @@ -170,6 +170,7 @@ public void setDataString(java.lang.CharSequence value) {
   
   /**
* Checks the dirty status of the 'dataString' field. A field is dirty if it 
represents a change that has not yet been written to the database.
+   * @param value the value to set.
 
 Review comment:
   A field named 'value' was added in 
[GORA-538](https://github.com/apache/gora/pull/171) . But, it is not merged 
yet. Should I remove those changes?.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-05 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r310877679
 
 

 ##
 File path: 
gora-cassandra/src/examples/java/org/apache/gora/cassandra/example/generated/AvroSerialization/CassandraKey.java
 ##
 @@ -311,6 +313,7 @@ public void setUrl(java.lang.CharSequence value) {
  
  /**
   * Checks the dirty status of the 'url' field. A field is dirty if it 
represents a change that has not yet been written to the database.
+  * @param value the value to set.
 
 Review comment:
   This issue was addressed in 
[GORA-396](https://github.com/apache/gora/pull/174). Maybe I could rebuild the 
examples once that PR is merged.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [gora] jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu datastore for Gora

2019-08-05 Thread GitBox
jhnmora000 commented on a change in pull request #178: GORA-485 Apache Kudu 
datastore for Gora
URL: https://github.com/apache/gora/pull/178#discussion_r310877697
 
 

 ##
 File path: 
gora-cassandra/src/examples/java/org/apache/gora/cassandra/example/generated/AvroSerialization/CassandraKey.java
 ##
 @@ -333,6 +336,7 @@ public void setTimestamp(java.lang.Long value) {
  
  /**
   * Checks the dirty status of the 'timestamp' field. A field is dirty 
if it represents a change that has not yet been written to the database.
+  * @param value the value to set.
 
 Review comment:
   This issue was addressed in 
[GORA-396](https://github.com/apache/gora/pull/174). Maybe I could rebuild the 
examples once that PR is merged.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services