You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by GitBox <gi...@apache.org> on 2020/08/25 17:58:04 UTC

[GitHub] [gora] arnenissen opened a new pull request #221: Add ScyllaDB Store

arnenissen opened a new pull request #221:
URL: https://github.com/apache/gora/pull/221


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [gora] kamaci commented on a change in pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
kamaci commented on a change in pull request #221:
URL: https://github.com/apache/gora/pull/221#discussion_r632669675



##########
File path: gora-scylladb/src/examples/java/org/apache/gora/scylladb/example/generated/AvroSerialization/ScyllaDBRecord.java
##########
@@ -0,0 +1,1299 @@
+/**
+ *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.scylladb.example.generated.AvroSerialization;  
+
+/** This object created to used as Persistent Object to test cassandra data store */
+public class ScyllaDBRecord extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent {
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ScyllaDBRecord\",\"namespace\":\"org.apache.gora.scylladb.example.generated.AvroSerialization\",\"doc\":\"This object created to used as Persistent Object to test cassandra data store\",\"fields\":[{\"name\":\"dataString\",\"type\":\"string\",\"default\":\"\"},{\"name\":\"dataInt\",\"type\":\"int\",\"default\":0},{\"name\":\"dataLong\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"dataDouble\",\"type\":[\"null\",\"double\"],\"default\":null},{\"name\":\"dataBytes\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"arrayInt\",\"type\":{\"type\":\"array\",\"items\":\"int\"},\"default\":null},{\"name\":\"arrayString\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"default\":null},{\"name\":\"arrayLong\",\"type\":{\"type\":\"array\",\"items\":\"long\"},\"default\":null},{\"name\":\"arrayDouble\",\"type\":{\"type\":\"array\",\"item
 s\":\"double\"},\"default\":null},{\"name\":\"mapInt\",\"type\":{\"type\":\"map\",\"values\":\"int\"},\"default\":{}},{\"name\":\"mapString\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":{}},{\"name\":\"mapLong\",\"type\":{\"type\":\"map\",\"values\":\"long\"},\"default\":{}},{\"name\":\"mapDouble\",\"type\":{\"type\":\"map\",\"values\":\"double\"},\"default\":{}}],\"default\":null}");
+  private static final long serialVersionUID = -5423182670341604358L;
+  /** Enum containing all data bean's fields. */
+  public static enum Field {
+    DATA_STRING(0, "dataString"),
+    DATA_INT(1, "dataInt"),
+    DATA_LONG(2, "dataLong"),
+    DATA_DOUBLE(3, "dataDouble"),
+    DATA_BYTES(4, "dataBytes"),
+    ARRAY_INT(5, "arrayInt"),
+    ARRAY_STRING(6, "arrayString"),
+    ARRAY_LONG(7, "arrayLong"),
+    ARRAY_DOUBLE(8, "arrayDouble"),
+    MAP_INT(9, "mapInt"),
+    MAP_STRING(10, "mapString"),
+    MAP_LONG(11, "mapLong"),
+    MAP_DOUBLE(12, "mapDouble"),
+    ;
+    /**
+     * Field's index.
+     */
+    private int index;
+
+    /**
+     * Field's name.
+     */
+    private String name;
+
+    /**
+     * Field's constructor
+     * @param index field's index.
+     * @param name field's name.
+     */
+    Field(int index, String name) {this.index=index;this.name=name;}
+
+    /**
+     * Gets field's index.
+     * @return int field's index.
+     */
+    public int getIndex() {return index;}
+
+    /**
+     * Gets field's name.
+     * @return String field's name.
+     */
+    public String getName() {return name;}
+
+    /**
+     * Gets field's attributes to string.
+     * @return String field's attributes to string.
+     */
+    public String toString() {return name;}
+  };
+
+  public static final String[] _ALL_FIELDS = {
+  "dataString",
+  "dataInt",
+  "dataLong",
+  "dataDouble",
+  "dataBytes",
+  "arrayInt",
+  "arrayString",
+  "arrayLong",
+  "arrayDouble",
+  "mapInt",
+  "mapString",
+  "mapLong",
+  "mapDouble",
+  };
+
+  /**
+   * Gets the total field count.
+   * @return int field count
+   */
+  public int getFieldsCount() {
+    return ScyllaDBRecord._ALL_FIELDS.length;
+  }
+
+  private java.lang.CharSequence dataString;
+  private int dataInt;
+  private java.lang.Long dataLong;
+  private java.lang.Double dataDouble;
+  private java.nio.ByteBuffer dataBytes;
+  private java.util.List<java.lang.Integer> arrayInt;
+  private java.util.List<java.lang.CharSequence> arrayString;
+  private java.util.List<java.lang.Long> arrayLong;
+  private java.util.List<java.lang.Double> arrayDouble;
+  private java.util.Map<java.lang.CharSequence,java.lang.Integer> mapInt;
+  private java.util.Map<java.lang.CharSequence,java.lang.CharSequence> mapString;
+  private java.util.Map<java.lang.CharSequence,java.lang.Long> mapLong;
+  private java.util.Map<java.lang.CharSequence,java.lang.Double> mapDouble;
+  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
+  // Used by DatumWriter.  Applications should not call. 
+  public java.lang.Object get(int field$) {
+    switch (field$) {
+    case 0: return this.dataString;
+    case 1: return this.dataInt;
+    case 2: return this.dataLong;
+    case 3: return this.dataDouble;
+    case 4: return this.dataBytes;
+    case 5: return this.arrayInt;
+    case 6: return this.arrayString;
+    case 7: return this.arrayLong;
+    case 8: return this.arrayDouble;
+    case 9: return this.mapInt;
+    case 10: return this.mapString;
+    case 11: return this.mapLong;
+    case 12: return this.mapDouble;
+    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+    }
+  }
+  
+  // Used by DatumReader.  Applications should not call. 
+  @SuppressWarnings(value="unchecked")
+  public void put(int field$, java.lang.Object value) {
+    switch (field$) {
+    case 0: this.dataString = (java.lang.CharSequence)(value); break;
+    case 1: this.dataInt = (java.lang.Integer)(value); break;
+    case 2: this.dataLong = (java.lang.Long)(value); break;
+    case 3: this.dataDouble = (java.lang.Double)(value); break;
+    case 4: this.dataBytes = (java.nio.ByteBuffer)(value); break;
+    case 5: this.arrayInt = (java.util.List<java.lang.Integer>)((value instanceof org.apache.gora.persistency.Dirtyable) ? value : new org.apache.gora.persistency.impl.DirtyListWrapper((java.util.List)value)); break;

Review comment:
       Check all the line lengths here.




-- 
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:
users@infra.apache.org



[GitHub] [gora] kamaci commented on a change in pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
kamaci commented on a change in pull request #221:
URL: https://github.com/apache/gora/pull/221#discussion_r632667516



##########
File path: gora-scylladb/src/examples/java/org/apache/gora/scylladb/example/generated/AvroSerialization/ScyllaDBKey.java
##########
@@ -0,0 +1,386 @@
+/**
+ *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.scylladb.example.generated.AvroSerialization;  
+
+/** This Object is created to used as Cassandra Key to test cassandra data store, Cassandra Key can be used to define partition keys, clustering keys. */
+public class ScyllaDBKey extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent {
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ScyllaDBKey\",\"namespace\":\"org.apache.gora.scylladb.example.generated.AvroSerialization\",\"doc\":\"This Object is created to used as Cassandra Key to test cassandra data store, Cassandra Key can be used to define partition keys, clustering keys.\",\"fields\":[{\"name\":\"url\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"timestamp\",\"type\":\"long\",\"default\":0}],\"default\":null}");
+  private static final long serialVersionUID = 232044203208115437L;
+  /** Enum containing all data bean's fields. */
+  public static enum Field {
+    URL(0, "url"),
+    TIMESTAMP(1, "timestamp"),
+    ;
+    /**
+     * Field's index.
+     */
+    private int index;
+
+    /**
+     * Field's name.
+     */
+    private String name;
+
+    /**
+     * Field's constructor
+     * @param index field's index.
+     * @param name field's name.
+     */
+    Field(int index, String name) {this.index=index;this.name=name;}
+
+    /**
+     * Gets field's index.
+     * @return int field's index.
+     */
+    public int getIndex() {return index;}
+
+    /**
+     * Gets field's name.
+     * @return String field's name.
+     */
+    public String getName() {return name;}
+
+    /**
+     * Gets field's attributes to string.
+     * @return String field's attributes to string.
+     */
+    public String toString() {return name;}
+  };
+
+  public static final String[] _ALL_FIELDS = {
+  "url",
+  "timestamp",
+  };
+
+  /**
+   * Gets the total field count.
+   * @return int field count
+   */
+  public int getFieldsCount() {
+    return ScyllaDBKey._ALL_FIELDS.length;
+  }
+
+  private java.lang.CharSequence url;
+  private long timestamp;
+  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
+  // Used by DatumWriter.  Applications should not call. 
+  public java.lang.Object get(int field$) {
+    switch (field$) {
+    case 0: return this.url;
+    case 1: return this.timestamp;
+    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+    }
+  }
+  
+  // Used by DatumReader.  Applications should not call. 
+  @SuppressWarnings(value="unchecked")
+  public void put(int field$, java.lang.Object value) {
+    switch (field$) {
+    case 0: this.url = (java.lang.CharSequence)(value); break;
+    case 1: this.timestamp = (java.lang.Long)(value); break;
+    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+    }
+  }
+
+  /**
+   * Gets the value of the 'url' field.
+   */
+  public java.lang.CharSequence getUrl() {
+    return url;
+  }
+
+  /**
+   * Sets the value of the 'url' field.
+   * @param value the value to set.
+   */
+  public void setUrl(java.lang.CharSequence value) {
+    this.url = value;
+    setDirty(0);
+  }
+  
+  /**
+   * 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.
+   */
+  public boolean isUrlDirty() {
+    return isDirty(0);
+  }
+
+  /**
+   * Gets the value of the 'timestamp' field.
+   */
+  public java.lang.Long getTimestamp() {
+    return timestamp;
+  }
+
+  /**
+   * Sets the value of the 'timestamp' field.
+   * @param value the value to set.
+   */
+  public void setTimestamp(java.lang.Long value) {
+    this.timestamp = value;
+    setDirty(1);
+  }
+  
+  /**
+   * 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.
+   */
+  public boolean isTimestampDirty() {
+    return isDirty(1);
+  }
+
+  /** Creates a new ScyllaDBKey RecordBuilder */
+  public static org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder newBuilder() {
+    return new org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder();
+  }
+  
+  /** Creates a new ScyllaDBKey RecordBuilder by copying an existing Builder */
+  public static org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder newBuilder(org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder other) {
+    return new org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder(other);
+  }
+  
+  /** Creates a new ScyllaDBKey RecordBuilder by copying an existing ScyllaDBKey instance */
+  public static org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder newBuilder(org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey other) {
+    return new org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder(other);
+  }
+  
+  @Override
+  public org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey clone() {
+    return newBuilder(this).build();
+  }
+  
+  private static java.nio.ByteBuffer deepCopyToReadOnlyBuffer(
+      java.nio.ByteBuffer input) {
+    java.nio.ByteBuffer copy = java.nio.ByteBuffer.allocate(input.capacity());
+    int position = input.position();
+    input.reset();
+    int mark = input.position();
+    int limit = input.limit();
+    input.rewind();
+    input.limit(input.capacity());
+    copy.put(input);
+    input.rewind();
+    copy.rewind();
+    input.position(mark);
+    input.mark();
+    copy.position(mark);
+    copy.mark();
+    input.position(position);
+    copy.position(position);
+    input.limit(limit);
+    copy.limit(limit);
+    return copy.asReadOnlyBuffer();
+  }
+  
+  /**
+   * RecordBuilder for ScyllaDBKey instances.
+   */
+  public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<ScyllaDBKey>
+    implements org.apache.avro.data.RecordBuilder<ScyllaDBKey> {
+
+    private java.lang.CharSequence url;
+    private long timestamp;
+
+    /** Creates a new Builder */
+    private Builder() {
+      super(org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.SCHEMA$);
+    }
+    
+    /** Creates a Builder by copying an existing Builder */
+    private Builder(org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder other) {
+      super(other);
+    }
+    
+    /** Creates a Builder by copying an existing ScyllaDBKey instance */
+    private Builder(org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey other) {
+            super(org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.SCHEMA$);
+      if (isValidValue(fields()[0], other.url)) {
+        this.url = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.url);
+        fieldSetFlags()[0] = true;
+      }
+      if (isValidValue(fields()[1], other.timestamp)) {
+        this.timestamp = (java.lang.Long) data().deepCopy(fields()[1].schema(), other.timestamp);
+        fieldSetFlags()[1] = true;
+      }
+    }
+
+    /** Gets the value of the 'url' field */
+    public java.lang.CharSequence getUrl() {
+      return url;
+    }
+    
+    /** Sets the value of the 'url' field */
+    public org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder setUrl(java.lang.CharSequence value) {
+      validate(fields()[0], value);
+      this.url = value;
+      fieldSetFlags()[0] = true;
+      return this; 
+    }
+    
+    /** Checks whether the 'url' field has been set */
+    public boolean hasUrl() {
+      return fieldSetFlags()[0];
+    }
+    
+    /** Clears the value of the 'url' field */
+    public org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder clearUrl() {
+      url = null;
+      fieldSetFlags()[0] = false;
+      return this;
+    }
+    
+    /** Gets the value of the 'timestamp' field */
+    public java.lang.Long getTimestamp() {
+      return timestamp;
+    }
+    
+    /** Sets the value of the 'timestamp' field */
+    public org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder setTimestamp(long value) {
+      validate(fields()[1], value);
+      this.timestamp = value;
+      fieldSetFlags()[1] = true;
+      return this; 
+    }
+    
+    /** Checks whether the 'timestamp' field has been set */
+    public boolean hasTimestamp() {
+      return fieldSetFlags()[1];
+    }
+    
+    /** Clears the value of the 'timestamp' field */
+    public org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder clearTimestamp() {
+      fieldSetFlags()[1] = false;
+      return this;
+    }
+    
+    @Override
+    public ScyllaDBKey build() {
+      try {
+        ScyllaDBKey record = new ScyllaDBKey();
+        record.url = fieldSetFlags()[0] ? this.url : (java.lang.CharSequence) defaultValue(fields()[0]);
+        record.timestamp = fieldSetFlags()[1] ? this.timestamp : (java.lang.Long) defaultValue(fields()[1]);
+        return record;
+      } catch (Exception e) {
+        throw new org.apache.avro.AvroRuntimeException(e);
+      }
+    }
+  }
+  
+  public ScyllaDBKey.Tombstone getTombstone(){
+    return TOMBSTONE;
+  }
+
+  public ScyllaDBKey newInstance(){
+    return newBuilder().build();
+  }
+
+  private static final Tombstone TOMBSTONE = new Tombstone();
+  
+  public static final class Tombstone extends ScyllaDBKey implements org.apache.gora.persistency.Tombstone {
+  
+    private Tombstone() { }
+  
+      /**
+     * Gets the value of the 'url' field.
+         */
+    public java.lang.CharSequence getUrl() {
+      throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
+    }
+
+    /**
+     * Sets the value of the 'url' field.
+         * @param value the value to set.
+     */
+    public void setUrl(java.lang.CharSequence value) {
+      throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
+    }
+  
+    /**
+     * 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.
+     */
+    public boolean isUrlDirty() {
+      throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
+    }
+
+        /**
+     * Gets the value of the 'timestamp' field.
+         */
+    public java.lang.Long getTimestamp() {
+      throw new java.lang.UnsupportedOperationException("Get is not supported on tombstones");
+    }
+
+    /**
+     * Sets the value of the 'timestamp' field.
+         * @param value the value to set.
+     */
+    public void setTimestamp(java.lang.Long value) {
+      throw new java.lang.UnsupportedOperationException("Set is not supported on tombstones");
+    }
+  
+    /**
+     * 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.
+     */
+    public boolean isTimestampDirty() {
+      throw new java.lang.UnsupportedOperationException("IsDirty is not supported on tombstones");
+    }
+

Review comment:
       Remove extra lines.




-- 
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:
users@infra.apache.org



[GitHub] [gora] kamaci commented on pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
kamaci commented on pull request #221:
URL: https://github.com/apache/gora/pull/221#issuecomment-841378487


   Thanks for your effort @arnenissen? Could you explain what is the difference using Cassandra client of Gora instead of this since ScyllaDB is designed to be compatible with Cassandra? 
   
   Can anybody use current Cassandra client to interact with ScyllaDB or not?


-- 
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:
users@infra.apache.org



[GitHub] [gora] kamaci commented on a change in pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
kamaci commented on a change in pull request #221:
URL: https://github.com/apache/gora/pull/221#discussion_r632667177



##########
File path: gora-scylladb/src/examples/java/org/apache/gora/scylladb/example/generated/AvroSerialization/ScyllaDBKey.java
##########
@@ -0,0 +1,386 @@
+/**
+ *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.scylladb.example.generated.AvroSerialization;  
+
+/** This Object is created to used as Cassandra Key to test cassandra data store, Cassandra Key can be used to define partition keys, clustering keys. */
+public class ScyllaDBKey extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent {
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ScyllaDBKey\",\"namespace\":\"org.apache.gora.scylladb.example.generated.AvroSerialization\",\"doc\":\"This Object is created to used as Cassandra Key to test cassandra data store, Cassandra Key can be used to define partition keys, clustering keys.\",\"fields\":[{\"name\":\"url\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"timestamp\",\"type\":\"long\",\"default\":0}],\"default\":null}");
+  private static final long serialVersionUID = 232044203208115437L;
+  /** Enum containing all data bean's fields. */
+  public static enum Field {
+    URL(0, "url"),
+    TIMESTAMP(1, "timestamp"),
+    ;
+    /**
+     * Field's index.
+     */
+    private int index;
+
+    /**
+     * Field's name.
+     */
+    private String name;
+
+    /**
+     * Field's constructor
+     * @param index field's index.
+     * @param name field's name.
+     */
+    Field(int index, String name) {this.index=index;this.name=name;}
+
+    /**
+     * Gets field's index.
+     * @return int field's index.
+     */
+    public int getIndex() {return index;}
+
+    /**
+     * Gets field's name.
+     * @return String field's name.
+     */
+    public String getName() {return name;}
+
+    /**
+     * Gets field's attributes to string.
+     * @return String field's attributes to string.
+     */
+    public String toString() {return name;}
+  };
+
+  public static final String[] _ALL_FIELDS = {
+  "url",
+  "timestamp",
+  };
+
+  /**
+   * Gets the total field count.
+   * @return int field count
+   */
+  public int getFieldsCount() {
+    return ScyllaDBKey._ALL_FIELDS.length;
+  }
+
+  private java.lang.CharSequence url;
+  private long timestamp;
+  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
+  // Used by DatumWriter.  Applications should not call. 
+  public java.lang.Object get(int field$) {
+    switch (field$) {
+    case 0: return this.url;
+    case 1: return this.timestamp;
+    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+    }
+  }
+  
+  // Used by DatumReader.  Applications should not call. 
+  @SuppressWarnings(value="unchecked")
+  public void put(int field$, java.lang.Object value) {
+    switch (field$) {
+    case 0: this.url = (java.lang.CharSequence)(value); break;
+    case 1: this.timestamp = (java.lang.Long)(value); break;
+    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+    }
+  }
+
+  /**
+   * Gets the value of the 'url' field.
+   */
+  public java.lang.CharSequence getUrl() {
+    return url;
+  }
+
+  /**
+   * Sets the value of the 'url' field.
+   * @param value the value to set.
+   */
+  public void setUrl(java.lang.CharSequence value) {
+    this.url = value;
+    setDirty(0);
+  }
+  
+  /**
+   * 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.
+   */
+  public boolean isUrlDirty() {
+    return isDirty(0);
+  }
+
+  /**
+   * Gets the value of the 'timestamp' field.
+   */
+  public java.lang.Long getTimestamp() {
+    return timestamp;
+  }
+
+  /**
+   * Sets the value of the 'timestamp' field.
+   * @param value the value to set.
+   */
+  public void setTimestamp(java.lang.Long value) {
+    this.timestamp = value;
+    setDirty(1);
+  }
+  
+  /**
+   * 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.
+   */
+  public boolean isTimestampDirty() {
+    return isDirty(1);
+  }
+
+  /** Creates a new ScyllaDBKey RecordBuilder */
+  public static org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder newBuilder() {
+    return new org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder();
+  }
+  
+  /** Creates a new ScyllaDBKey RecordBuilder by copying an existing Builder */
+  public static org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder newBuilder(org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder other) {

Review comment:
       Line length is too much. Please check all the PR.

##########
File path: gora-scylladb/src/examples/java/org/apache/gora/scylladb/example/generated/AvroSerialization/ScyllaDBKey.java
##########
@@ -0,0 +1,386 @@
+/**
+ *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.scylladb.example.generated.AvroSerialization;  
+
+/** This Object is created to used as Cassandra Key to test cassandra data store, Cassandra Key can be used to define partition keys, clustering keys. */
+public class ScyllaDBKey extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent {
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ScyllaDBKey\",\"namespace\":\"org.apache.gora.scylladb.example.generated.AvroSerialization\",\"doc\":\"This Object is created to used as Cassandra Key to test cassandra data store, Cassandra Key can be used to define partition keys, clustering keys.\",\"fields\":[{\"name\":\"url\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"timestamp\",\"type\":\"long\",\"default\":0}],\"default\":null}");
+  private static final long serialVersionUID = 232044203208115437L;
+  /** Enum containing all data bean's fields. */
+  public static enum Field {
+    URL(0, "url"),
+    TIMESTAMP(1, "timestamp"),
+    ;
+    /**
+     * Field's index.
+     */
+    private int index;
+
+    /**
+     * Field's name.
+     */
+    private String name;
+
+    /**
+     * Field's constructor
+     * @param index field's index.
+     * @param name field's name.
+     */
+    Field(int index, String name) {this.index=index;this.name=name;}
+
+    /**
+     * Gets field's index.
+     * @return int field's index.
+     */
+    public int getIndex() {return index;}
+
+    /**
+     * Gets field's name.
+     * @return String field's name.
+     */
+    public String getName() {return name;}
+
+    /**
+     * Gets field's attributes to string.
+     * @return String field's attributes to string.
+     */
+    public String toString() {return name;}
+  };
+
+  public static final String[] _ALL_FIELDS = {
+  "url",
+  "timestamp",
+  };
+
+  /**
+   * Gets the total field count.
+   * @return int field count
+   */
+  public int getFieldsCount() {
+    return ScyllaDBKey._ALL_FIELDS.length;
+  }
+
+  private java.lang.CharSequence url;
+  private long timestamp;
+  public org.apache.avro.Schema getSchema() { return SCHEMA$; }
+  // Used by DatumWriter.  Applications should not call. 
+  public java.lang.Object get(int field$) {
+    switch (field$) {
+    case 0: return this.url;
+    case 1: return this.timestamp;
+    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+    }
+  }
+  
+  // Used by DatumReader.  Applications should not call. 
+  @SuppressWarnings(value="unchecked")
+  public void put(int field$, java.lang.Object value) {
+    switch (field$) {
+    case 0: this.url = (java.lang.CharSequence)(value); break;
+    case 1: this.timestamp = (java.lang.Long)(value); break;
+    default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+    }
+  }
+
+  /**
+   * Gets the value of the 'url' field.
+   */
+  public java.lang.CharSequence getUrl() {
+    return url;
+  }
+
+  /**
+   * Sets the value of the 'url' field.
+   * @param value the value to set.
+   */
+  public void setUrl(java.lang.CharSequence value) {
+    this.url = value;
+    setDirty(0);
+  }
+  
+  /**
+   * 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.
+   */
+  public boolean isUrlDirty() {
+    return isDirty(0);
+  }
+
+  /**
+   * Gets the value of the 'timestamp' field.
+   */
+  public java.lang.Long getTimestamp() {
+    return timestamp;
+  }
+
+  /**
+   * Sets the value of the 'timestamp' field.
+   * @param value the value to set.
+   */
+  public void setTimestamp(java.lang.Long value) {
+    this.timestamp = value;
+    setDirty(1);
+  }
+  
+  /**
+   * 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.
+   */
+  public boolean isTimestampDirty() {
+    return isDirty(1);
+  }
+
+  /** Creates a new ScyllaDBKey RecordBuilder */
+  public static org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder newBuilder() {
+    return new org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder();
+  }
+  
+  /** Creates a new ScyllaDBKey RecordBuilder by copying an existing Builder */
+  public static org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder newBuilder(org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder other) {
+    return new org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder(other);
+  }
+  
+  /** Creates a new ScyllaDBKey RecordBuilder by copying an existing ScyllaDBKey instance */
+  public static org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey.Builder newBuilder(org.apache.gora.scylladb.example.generated.AvroSerialization.ScyllaDBKey other) {

Review comment:
       Line length is too much.




-- 
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:
users@infra.apache.org



[GitHub] [gora] lewismc closed pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
lewismc closed pull request #221:
URL: https://github.com/apache/gora/pull/221


   


-- 
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:
users@infra.apache.org



[GitHub] [gora] kamaci edited a comment on pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
kamaci edited a comment on pull request #221:
URL: https://github.com/apache/gora/pull/221#issuecomment-841378487


   Thanks for your effort @arnenissen! 
   
   Could you explain what is the difference using Cassandra client of Gora instead of this since ScyllaDB is designed to be compatible with Cassandra? 
   
   Can anybody use current Cassandra client to interact with ScyllaDB or not?


-- 
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:
users@infra.apache.org



[GitHub] [gora] kamaci commented on a change in pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
kamaci commented on a change in pull request #221:
URL: https://github.com/apache/gora/pull/221#discussion_r632668517



##########
File path: gora-scylladb/src/examples/java/org/apache/gora/scylladb/example/generated/AvroSerialization/ScyllaDBRecord.java
##########
@@ -0,0 +1,1299 @@
+/**
+ *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.scylladb.example.generated.AvroSerialization;  
+
+/** This object created to used as Persistent Object to test cassandra data store */
+public class ScyllaDBRecord extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent {
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ScyllaDBRecord\",\"namespace\":\"org.apache.gora.scylladb.example.generated.AvroSerialization\",\"doc\":\"This object created to used as Persistent Object to test cassandra data store\",\"fields\":[{\"name\":\"dataString\",\"type\":\"string\",\"default\":\"\"},{\"name\":\"dataInt\",\"type\":\"int\",\"default\":0},{\"name\":\"dataLong\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"dataDouble\",\"type\":[\"null\",\"double\"],\"default\":null},{\"name\":\"dataBytes\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"arrayInt\",\"type\":{\"type\":\"array\",\"items\":\"int\"},\"default\":null},{\"name\":\"arrayString\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"default\":null},{\"name\":\"arrayLong\",\"type\":{\"type\":\"array\",\"items\":\"long\"},\"default\":null},{\"name\":\"arrayDouble\",\"type\":{\"type\":\"array\",\"item
 s\":\"double\"},\"default\":null},{\"name\":\"mapInt\",\"type\":{\"type\":\"map\",\"values\":\"int\"},\"default\":{}},{\"name\":\"mapString\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":{}},{\"name\":\"mapLong\",\"type\":{\"type\":\"map\",\"values\":\"long\"},\"default\":{}},{\"name\":\"mapDouble\",\"type\":{\"type\":\"map\",\"values\":\"double\"},\"default\":{}}],\"default\":null}");
+  private static final long serialVersionUID = -5423182670341604358L;
+  /** Enum containing all data bean's fields. */
+  public static enum Field {
+    DATA_STRING(0, "dataString"),
+    DATA_INT(1, "dataInt"),
+    DATA_LONG(2, "dataLong"),
+    DATA_DOUBLE(3, "dataDouble"),
+    DATA_BYTES(4, "dataBytes"),
+    ARRAY_INT(5, "arrayInt"),
+    ARRAY_STRING(6, "arrayString"),
+    ARRAY_LONG(7, "arrayLong"),
+    ARRAY_DOUBLE(8, "arrayDouble"),
+    MAP_INT(9, "mapInt"),
+    MAP_STRING(10, "mapString"),
+    MAP_LONG(11, "mapLong"),
+    MAP_DOUBLE(12, "mapDouble"),
+    ;
+    /**
+     * Field's index.
+     */
+    private int index;
+
+    /**
+     * Field's name.
+     */
+    private String name;
+
+    /**
+     * Field's constructor
+     * @param index field's index.
+     * @param name field's name.
+     */
+    Field(int index, String name) {this.index=index;this.name=name;}

Review comment:
       Start the method body with a new line.




-- 
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:
users@infra.apache.org



[GitHub] [gora] kamaci commented on a change in pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
kamaci commented on a change in pull request #221:
URL: https://github.com/apache/gora/pull/221#discussion_r632666067



##########
File path: gora-scylladb/pom.xml
##########
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>gora</artifactId>
+        <groupId>org.apache.gora</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>gora-scylladb</artifactId>
+    <packaging>bundle</packaging>
+
+
+
+    <name>Apache Gora :: ScyllaDB</name>
+    <url>http://gora.apache.org</url>
+    <description>The Apache Gora open source framework provides an in-memory data model and
+        persistence for big data. Gora supports persisting to column stores, key value stores,
+        document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop MapReduce
+        support.
+    </description>
+    <inceptionYear>2010</inceptionYear>
+    <organization>
+        <name>The Apache Software Foundation</name>
+        <url>http://www.apache.org/</url>
+    </organization>
+    <issueManagement>
+        <system>JIRA</system>
+        <url>https://issues.apache.org/jira/browse/GORA</url>
+    </issueManagement>
+    <ciManagement>
+        <system>Jenkins</system>
+        <url>https://builds.apache.org/job/Gora-trunk/</url>
+    </ciManagement>
+
+    <properties>
+        <guava.version>18.0</guava.version>
+        <osgi.import>*</osgi.import>
+        <osgi.export>org.apache.gora.cassandra*;version="${project.version}";-noimport:=true</osgi.export>
+    </properties>
+
+    <build>
+        <directory>target</directory>
+        <outputDirectory>target/classes</outputDirectory>
+        <finalName>${project.artifactId}-${project.version}</finalName>
+        <testOutputDirectory>target/test-classes</testOutputDirectory>
+        <testSourceDirectory>src/test/java</testSourceDirectory>
+        <sourceDirectory>src/main/java</sourceDirectory>
+        <testResources>
+            <testResource>
+                <directory>${project.basedir}/src/test/conf</directory>
+                <includes>
+                    <include>**/*</include>
+                </includes>
+                <!--targetPath>${project.basedir}/target/classes/</targetPath-->
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>${build-helper-maven-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <phase>generate-test-sources</phase>
+                        <goals>
+                            <goal>add-test-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>src/examples/java</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.maven.surefire</groupId>
+                        <artifactId>surefire-junit47</artifactId>
+                        <version>2.20</version>

Review comment:
       It is already defined at parent pom.




-- 
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:
users@infra.apache.org



[GitHub] [gora] djkevincr commented on pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
djkevincr commented on pull request #221:
URL: https://github.com/apache/gora/pull/221#issuecomment-683992609


   @arnenissen Thank you for your hard work during the GSoC period. PR looks very good. I m going to keep PR for a while for let others to review. Good Luck with your final evaluation.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [gora] djkevincr commented on pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
djkevincr commented on pull request #221:
URL: https://github.com/apache/gora/pull/221#issuecomment-713071877


   Please raise if there are any concerns. Otherwise I will proceed merging this PR to master.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [gora] kamaci commented on a change in pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
kamaci commented on a change in pull request #221:
URL: https://github.com/apache/gora/pull/221#discussion_r632668707



##########
File path: gora-scylladb/src/examples/java/org/apache/gora/scylladb/example/generated/AvroSerialization/ScyllaDBRecord.java
##########
@@ -0,0 +1,1299 @@
+/**
+ *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.scylladb.example.generated.AvroSerialization;  
+
+/** This object created to used as Persistent Object to test cassandra data store */
+public class ScyllaDBRecord extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent {
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ScyllaDBRecord\",\"namespace\":\"org.apache.gora.scylladb.example.generated.AvroSerialization\",\"doc\":\"This object created to used as Persistent Object to test cassandra data store\",\"fields\":[{\"name\":\"dataString\",\"type\":\"string\",\"default\":\"\"},{\"name\":\"dataInt\",\"type\":\"int\",\"default\":0},{\"name\":\"dataLong\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"dataDouble\",\"type\":[\"null\",\"double\"],\"default\":null},{\"name\":\"dataBytes\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"arrayInt\",\"type\":{\"type\":\"array\",\"items\":\"int\"},\"default\":null},{\"name\":\"arrayString\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"default\":null},{\"name\":\"arrayLong\",\"type\":{\"type\":\"array\",\"items\":\"long\"},\"default\":null},{\"name\":\"arrayDouble\",\"type\":{\"type\":\"array\",\"item
 s\":\"double\"},\"default\":null},{\"name\":\"mapInt\",\"type\":{\"type\":\"map\",\"values\":\"int\"},\"default\":{}},{\"name\":\"mapString\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":{}},{\"name\":\"mapLong\",\"type\":{\"type\":\"map\",\"values\":\"long\"},\"default\":{}},{\"name\":\"mapDouble\",\"type\":{\"type\":\"map\",\"values\":\"double\"},\"default\":{}}],\"default\":null}");
+  private static final long serialVersionUID = -5423182670341604358L;
+  /** Enum containing all data bean's fields. */
+  public static enum Field {
+    DATA_STRING(0, "dataString"),
+    DATA_INT(1, "dataInt"),
+    DATA_LONG(2, "dataLong"),
+    DATA_DOUBLE(3, "dataDouble"),
+    DATA_BYTES(4, "dataBytes"),
+    ARRAY_INT(5, "arrayInt"),
+    ARRAY_STRING(6, "arrayString"),
+    ARRAY_LONG(7, "arrayLong"),
+    ARRAY_DOUBLE(8, "arrayDouble"),
+    MAP_INT(9, "mapInt"),
+    MAP_STRING(10, "mapString"),
+    MAP_LONG(11, "mapLong"),
+    MAP_DOUBLE(12, "mapDouble"),
+    ;
+    /**
+     * Field's index.
+     */
+    private int index;
+
+    /**
+     * Field's name.
+     */
+    private String name;
+
+    /**
+     * Field's constructor
+     * @param index field's index.
+     * @param name field's name.
+     */
+    Field(int index, String name) {this.index=index;this.name=name;}
+
+    /**
+     * Gets field's index.
+     * @return int field's index.
+     */
+    public int getIndex() {return index;}
+
+    /**
+     * Gets field's name.
+     * @return String field's name.
+     */
+    public String getName() {return name;}
+
+    /**
+     * Gets field's attributes to string.
+     * @return String field's attributes to string.
+     */
+    public String toString() {return name;}
+  };
+
+  public static final String[] _ALL_FIELDS = {
+  "dataString",

Review comment:
       Check the indentation.




-- 
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:
users@infra.apache.org



[GitHub] [gora] lewismc commented on a change in pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
lewismc commented on a change in pull request #221:
URL: https://github.com/apache/gora/pull/221#discussion_r628400804



##########
File path: gora-scylladb/pom.xml
##########
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>gora</artifactId>
+        <groupId>org.apache.gora</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>gora-scylladb</artifactId>
+    <packaging>bundle</packaging>
+
+
+
+    <name>Apache Gora :: ScyllaDB</name>
+    <url>http://gora.apache.org</url>
+    <description>The Apache Gora open source framework provides an in-memory data model and
+        persistence for big data. Gora supports persisting to column stores, key value stores,
+        document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop MapReduce
+        support.
+    </description>
+    <inceptionYear>2010</inceptionYear>
+    <organization>
+        <name>The Apache Software Foundation</name>
+        <url>http://www.apache.org/</url>
+    </organization>
+    <issueManagement>
+        <system>JIRA</system>
+        <url>https://issues.apache.org/jira/browse/GORA</url>
+    </issueManagement>
+    <ciManagement>
+        <system>Jenkins</system>
+        <url>https://builds.apache.org/job/Gora-trunk/</url>
+    </ciManagement>
+
+    <properties>
+        <guava.version>18.0</guava.version>

Review comment:
       Is this not defined in parent pom?

##########
File path: gora-scylladb/pom.xml
##########
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>gora</artifactId>
+        <groupId>org.apache.gora</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>gora-scylladb</artifactId>
+    <packaging>bundle</packaging>
+
+
+
+    <name>Apache Gora :: ScyllaDB</name>
+    <url>http://gora.apache.org</url>
+    <description>The Apache Gora open source framework provides an in-memory data model and
+        persistence for big data. Gora supports persisting to column stores, key value stores,
+        document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop MapReduce
+        support.
+    </description>
+    <inceptionYear>2010</inceptionYear>
+    <organization>
+        <name>The Apache Software Foundation</name>
+        <url>http://www.apache.org/</url>
+    </organization>
+    <issueManagement>
+        <system>JIRA</system>
+        <url>https://issues.apache.org/jira/browse/GORA</url>
+    </issueManagement>
+    <ciManagement>
+        <system>Jenkins</system>
+        <url>https://builds.apache.org/job/Gora-trunk/</url>
+    </ciManagement>
+
+    <properties>
+        <guava.version>18.0</guava.version>
+        <osgi.import>*</osgi.import>
+        <osgi.export>org.apache.gora.cassandra*;version="${project.version}";-noimport:=true</osgi.export>
+    </properties>
+
+    <build>
+        <directory>target</directory>
+        <outputDirectory>target/classes</outputDirectory>
+        <finalName>${project.artifactId}-${project.version}</finalName>
+        <testOutputDirectory>target/test-classes</testOutputDirectory>
+        <testSourceDirectory>src/test/java</testSourceDirectory>
+        <sourceDirectory>src/main/java</sourceDirectory>
+        <testResources>
+            <testResource>
+                <directory>${project.basedir}/src/test/conf</directory>
+                <includes>
+                    <include>**/*</include>
+                </includes>
+                <!--targetPath>${project.basedir}/target/classes/</targetPath-->
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>${build-helper-maven-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <phase>generate-test-sources</phase>
+                        <goals>
+                            <goal>add-test-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>src/examples/java</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.maven.surefire</groupId>
+                        <artifactId>surefire-junit47</artifactId>
+                        <version>2.20</version>
+                    </dependency>
+                </dependencies>
+                <configuration>
+                    <forkMode>always</forkMode>
+                    <argLine>-Xmx4096m</argLine>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <!-- Gora Internal Dependencies -->
+        <dependency>
+            <groupId>org.apache.gora</groupId>
+            <artifactId>gora-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.gora</groupId>
+            <artifactId>gora-core</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <!-- Cassandra Driver Dependencies -->

Review comment:
       Cassandra?

##########
File path: gora-scylladb/pom.xml
##########
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>gora</artifactId>
+        <groupId>org.apache.gora</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>gora-scylladb</artifactId>
+    <packaging>bundle</packaging>
+

Review comment:
       Remove whitespace.

##########
File path: gora-scylladb/pom.xml
##########
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>gora</artifactId>
+        <groupId>org.apache.gora</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>gora-scylladb</artifactId>
+    <packaging>bundle</packaging>
+
+
+
+    <name>Apache Gora :: ScyllaDB</name>
+    <url>http://gora.apache.org</url>
+    <description>The Apache Gora open source framework provides an in-memory data model and
+        persistence for big data. Gora supports persisting to column stores, key value stores,
+        document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop MapReduce
+        support.
+    </description>
+    <inceptionYear>2010</inceptionYear>
+    <organization>
+        <name>The Apache Software Foundation</name>
+        <url>http://www.apache.org/</url>
+    </organization>
+    <issueManagement>
+        <system>JIRA</system>
+        <url>https://issues.apache.org/jira/browse/GORA</url>
+    </issueManagement>
+    <ciManagement>
+        <system>Jenkins</system>
+        <url>https://builds.apache.org/job/Gora-trunk/</url>
+    </ciManagement>
+
+    <properties>
+        <guava.version>18.0</guava.version>
+        <osgi.import>*</osgi.import>
+        <osgi.export>org.apache.gora.cassandra*;version="${project.version}";-noimport:=true</osgi.export>
+    </properties>
+
+    <build>
+        <directory>target</directory>
+        <outputDirectory>target/classes</outputDirectory>
+        <finalName>${project.artifactId}-${project.version}</finalName>
+        <testOutputDirectory>target/test-classes</testOutputDirectory>
+        <testSourceDirectory>src/test/java</testSourceDirectory>
+        <sourceDirectory>src/main/java</sourceDirectory>
+        <testResources>
+            <testResource>
+                <directory>${project.basedir}/src/test/conf</directory>
+                <includes>
+                    <include>**/*</include>
+                </includes>
+                <!--targetPath>${project.basedir}/target/classes/</targetPath-->

Review comment:
       If redundant please remove. 

##########
File path: gora-scylladb/src/test/java/org/apache/gora/scylladb/StartupLogWaitStrategy.java
##########
@@ -0,0 +1,55 @@
+/**
+ * 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.scylladb;
+
+import org.testcontainers.containers.ContainerLaunchException;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.output.OutputFrame;
+import org.testcontainers.containers.output.WaitingConsumer;
+
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.function.Predicate;
+
+/**
+ * Utility class for detecting when the docker container is ready.
+ */
+public class StartupLogWaitStrategy extends GenericContainer.AbstractWaitStrategy {

Review comment:
       ```Error:  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project gora-scylladb: Compilation failure
   Error:  /home/runner/work/gora/gora/gora-scylladb/src/test/java/org/apache/gora/scylladb/StartupLogWaitStrategy.java:[32,60] error: cannot find symbol
   Error:  -> [Help 1]
   ```
   This was flagged by the CI build. Can you please fix?

##########
File path: gora-scylladb/pom.xml
##########
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~  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.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>gora</artifactId>
+        <groupId>org.apache.gora</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>gora-scylladb</artifactId>
+    <packaging>bundle</packaging>
+
+
+
+    <name>Apache Gora :: ScyllaDB</name>
+    <url>http://gora.apache.org</url>
+    <description>The Apache Gora open source framework provides an in-memory data model and
+        persistence for big data. Gora supports persisting to column stores, key value stores,
+        document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop MapReduce
+        support.
+    </description>
+    <inceptionYear>2010</inceptionYear>
+    <organization>
+        <name>The Apache Software Foundation</name>
+        <url>http://www.apache.org/</url>
+    </organization>
+    <issueManagement>
+        <system>JIRA</system>
+        <url>https://issues.apache.org/jira/browse/GORA</url>
+    </issueManagement>
+    <ciManagement>
+        <system>Jenkins</system>
+        <url>https://builds.apache.org/job/Gora-trunk/</url>
+    </ciManagement>
+
+    <properties>
+        <guava.version>18.0</guava.version>
+        <osgi.import>*</osgi.import>
+        <osgi.export>org.apache.gora.cassandra*;version="${project.version}";-noimport:=true</osgi.export>
+    </properties>
+
+    <build>
+        <directory>target</directory>
+        <outputDirectory>target/classes</outputDirectory>
+        <finalName>${project.artifactId}-${project.version}</finalName>
+        <testOutputDirectory>target/test-classes</testOutputDirectory>
+        <testSourceDirectory>src/test/java</testSourceDirectory>
+        <sourceDirectory>src/main/java</sourceDirectory>
+        <testResources>
+            <testResource>
+                <directory>${project.basedir}/src/test/conf</directory>
+                <includes>
+                    <include>**/*</include>
+                </includes>
+                <!--targetPath>${project.basedir}/target/classes/</targetPath-->
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>${build-helper-maven-plugin.version}</version>
+                <executions>
+                    <execution>
+                        <phase>generate-test-sources</phase>
+                        <goals>
+                            <goal>add-test-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>src/examples/java</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.maven.surefire</groupId>
+                        <artifactId>surefire-junit47</artifactId>
+                        <version>2.20</version>
+                    </dependency>
+                </dependencies>
+                <configuration>
+                    <forkMode>always</forkMode>
+                    <argLine>-Xmx4096m</argLine>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <!-- Gora Internal Dependencies -->
+        <dependency>
+            <groupId>org.apache.gora</groupId>
+            <artifactId>gora-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.gora</groupId>
+            <artifactId>gora-core</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <!-- Cassandra Driver Dependencies -->
+        <dependency>
+            <groupId>com.scylladb</groupId>
+            <artifactId>java-driver-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.scylladb</groupId>
+            <artifactId>java-driver-mapper-runtime</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.scylladb</groupId>
+            <artifactId>scylla-driver-mapping</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.scylladb</groupId>
+            <artifactId>scylla-driver-extras</artifactId>
+        </dependency>
+
+        <dependency>

Review comment:
       Why HBase and Cassandra?

##########
File path: gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
##########
@@ -85,7 +85,7 @@ public Cluster getCluster() {
     return cluster;
   }
 
-  void initialize(Properties properties, CassandraMapping mapping) throws Exception {
+  public void initialize(Properties properties, CassandraMapping mapping) throws Exception {

Review comment:
       @arnenissen please remove all of this cassandra logic. This is orthogonal to the goal of this pull request. Thank you




-- 
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:
users@infra.apache.org



[GitHub] [gora] kamaci commented on a change in pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
kamaci commented on a change in pull request #221:
URL: https://github.com/apache/gora/pull/221#discussion_r632668274



##########
File path: gora-scylladb/src/examples/java/org/apache/gora/scylladb/example/generated/AvroSerialization/ScyllaDBRecord.java
##########
@@ -0,0 +1,1299 @@
+/**
+ *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.scylladb.example.generated.AvroSerialization;  
+
+/** This object created to used as Persistent Object to test cassandra data store */
+public class ScyllaDBRecord extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent {
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ScyllaDBRecord\",\"namespace\":\"org.apache.gora.scylladb.example.generated.AvroSerialization\",\"doc\":\"This object created to used as Persistent Object to test cassandra data store\",\"fields\":[{\"name\":\"dataString\",\"type\":\"string\",\"default\":\"\"},{\"name\":\"dataInt\",\"type\":\"int\",\"default\":0},{\"name\":\"dataLong\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"dataDouble\",\"type\":[\"null\",\"double\"],\"default\":null},{\"name\":\"dataBytes\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"arrayInt\",\"type\":{\"type\":\"array\",\"items\":\"int\"},\"default\":null},{\"name\":\"arrayString\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"default\":null},{\"name\":\"arrayLong\",\"type\":{\"type\":\"array\",\"items\":\"long\"},\"default\":null},{\"name\":\"arrayDouble\",\"type\":{\"type\":\"array\",\"item
 s\":\"double\"},\"default\":null},{\"name\":\"mapInt\",\"type\":{\"type\":\"map\",\"values\":\"int\"},\"default\":{}},{\"name\":\"mapString\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":{}},{\"name\":\"mapLong\",\"type\":{\"type\":\"map\",\"values\":\"long\"},\"default\":{}},{\"name\":\"mapDouble\",\"type\":{\"type\":\"map\",\"values\":\"double\"},\"default\":{}}],\"default\":null}");
+  private static final long serialVersionUID = -5423182670341604358L;
+  /** Enum containing all data bean's fields. */
+  public static enum Field {
+    DATA_STRING(0, "dataString"),
+    DATA_INT(1, "dataInt"),
+    DATA_LONG(2, "dataLong"),
+    DATA_DOUBLE(3, "dataDouble"),
+    DATA_BYTES(4, "dataBytes"),
+    ARRAY_INT(5, "arrayInt"),
+    ARRAY_STRING(6, "arrayString"),
+    ARRAY_LONG(7, "arrayLong"),
+    ARRAY_DOUBLE(8, "arrayDouble"),
+    MAP_INT(9, "mapInt"),
+    MAP_STRING(10, "mapString"),
+    MAP_LONG(11, "mapLong"),
+    MAP_DOUBLE(12, "mapDouble"),

Review comment:
       No need a comma before a semicolon.




-- 
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:
users@infra.apache.org



[GitHub] [gora] kamaci commented on a change in pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
kamaci commented on a change in pull request #221:
URL: https://github.com/apache/gora/pull/221#discussion_r632669501



##########
File path: gora-scylladb/src/examples/java/org/apache/gora/scylladb/example/generated/AvroSerialization/ScyllaDBRecord.java
##########
@@ -0,0 +1,1299 @@
+/**
+ *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.scylladb.example.generated.AvroSerialization;  
+
+/** This object created to used as Persistent Object to test cassandra data store */
+public class ScyllaDBRecord extends org.apache.gora.persistency.impl.PersistentBase implements org.apache.avro.specific.SpecificRecord, org.apache.gora.persistency.Persistent {
+  public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"ScyllaDBRecord\",\"namespace\":\"org.apache.gora.scylladb.example.generated.AvroSerialization\",\"doc\":\"This object created to used as Persistent Object to test cassandra data store\",\"fields\":[{\"name\":\"dataString\",\"type\":\"string\",\"default\":\"\"},{\"name\":\"dataInt\",\"type\":\"int\",\"default\":0},{\"name\":\"dataLong\",\"type\":[\"null\",\"long\"],\"default\":null},{\"name\":\"dataDouble\",\"type\":[\"null\",\"double\"],\"default\":null},{\"name\":\"dataBytes\",\"type\":[\"null\",\"bytes\"],\"default\":null},{\"name\":\"arrayInt\",\"type\":{\"type\":\"array\",\"items\":\"int\"},\"default\":null},{\"name\":\"arrayString\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"default\":null},{\"name\":\"arrayLong\",\"type\":{\"type\":\"array\",\"items\":\"long\"},\"default\":null},{\"name\":\"arrayDouble\",\"type\":{\"type\":\"array\",\"item
 s\":\"double\"},\"default\":null},{\"name\":\"mapInt\",\"type\":{\"type\":\"map\",\"values\":\"int\"},\"default\":{}},{\"name\":\"mapString\",\"type\":{\"type\":\"map\",\"values\":\"string\"},\"default\":{}},{\"name\":\"mapLong\",\"type\":{\"type\":\"map\",\"values\":\"long\"},\"default\":{}},{\"name\":\"mapDouble\",\"type\":{\"type\":\"map\",\"values\":\"double\"},\"default\":{}}],\"default\":null}");
+  private static final long serialVersionUID = -5423182670341604358L;
+  /** Enum containing all data bean's fields. */
+  public static enum Field {
+    DATA_STRING(0, "dataString"),
+    DATA_INT(1, "dataInt"),
+    DATA_LONG(2, "dataLong"),
+    DATA_DOUBLE(3, "dataDouble"),
+    DATA_BYTES(4, "dataBytes"),
+    ARRAY_INT(5, "arrayInt"),
+    ARRAY_STRING(6, "arrayString"),
+    ARRAY_LONG(7, "arrayLong"),
+    ARRAY_DOUBLE(8, "arrayDouble"),
+    MAP_INT(9, "mapInt"),
+    MAP_STRING(10, "mapString"),
+    MAP_LONG(11, "mapLong"),
+    MAP_DOUBLE(12, "mapDouble"),
+    ;
+    /**
+     * Field's index.
+     */
+    private int index;
+
+    /**
+     * Field's name.
+     */
+    private String name;
+
+    /**
+     * Field's constructor
+     * @param index field's index.
+     * @param name field's name.
+     */
+    Field(int index, String name) {this.index=index;this.name=name;}
+
+    /**
+     * Gets field's index.
+     * @return int field's index.
+     */
+    public int getIndex() {return index;}
+
+    /**
+     * Gets field's name.
+     * @return String field's name.
+     */
+    public String getName() {return name;}
+
+    /**
+     * Gets field's attributes to string.
+     * @return String field's attributes to string.
+     */
+    public String toString() {return name;}
+  };
+
+  public static final String[] _ALL_FIELDS = {
+  "dataString",
+  "dataInt",
+  "dataLong",
+  "dataDouble",
+  "dataBytes",
+  "arrayInt",
+  "arrayString",
+  "arrayLong",
+  "arrayDouble",
+  "mapInt",
+  "mapString",
+  "mapLong",
+  "mapDouble",
+  };
+
+  /**
+   * Gets the total field count.
+   * @return int field count
+   */
+  public int getFieldsCount() {
+    return ScyllaDBRecord._ALL_FIELDS.length;
+  }
+
+  private java.lang.CharSequence dataString;

Review comment:
       java.lang is imported as default




-- 
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:
users@infra.apache.org



[GitHub] [gora] kamaci commented on a change in pull request #221: Add ScyllaDB Store

Posted by GitBox <gi...@apache.org>.
kamaci commented on a change in pull request #221:
URL: https://github.com/apache/gora/pull/221#discussion_r632666601



##########
File path: gora-scylladb/src/examples/avro/scyllaDBKey.json
##########
@@ -0,0 +1,22 @@
+{
+  "type": "record",
+  "name": "ScyllaDBKey",
+  "default": null,
+  "namespace": "org.apache.gora.scylladb.example.generated.AvroSerialization",
+  "doc": "This Object is created to used as Cassandra Key to test cassandra data store, Cassandra Key can be used to define partition keys, clustering keys.",

Review comment:
       Cassandra?

##########
File path: gora-scylladb/src/examples/avro/scyllaDBRecord.json
##########
@@ -0,0 +1,107 @@
+{
+  "type": "record",
+  "name": "ScyllaDBRecord",
+  "default": null,
+  "namespace": "org.apache.gora.scylladb.example.generated.AvroSerialization",
+  "doc": "This object created to used as Persistent Object to test cassandra data store",

Review comment:
       Cassandra?

##########
File path: gora-scylladb/src/examples/java/org/apache/gora/scylladb/example/generated/AvroSerialization/ScyllaDBKey.java
##########
@@ -0,0 +1,386 @@
+/**
+ *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.scylladb.example.generated.AvroSerialization;  
+
+/** This Object is created to used as Cassandra Key to test cassandra data store, Cassandra Key can be used to define partition keys, clustering keys. */

Review comment:
       Cassandra?




-- 
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:
users@infra.apache.org