gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewismc <...@git.apache.org>
Subject [GitHub] gora pull request #110: Initial commit gora cassandra cql
Date Mon, 19 Jun 2017 20:19:04 GMT
Github user lewismc commented on a diff in the pull request:

    https://github.com/apache/gora/pull/110#discussion_r122808313
  
    --- Diff: gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
---
    @@ -0,0 +1,516 @@
    +/*
    + *  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.cassandra.store;
    +
    +import com.datastax.driver.core.*;
    +import com.datastax.driver.core.policies.*;
    +import org.apache.gora.persistency.BeanFactory;
    +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.hadoop.conf.Configuration;
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import java.io.DataInput;
    +import java.io.DataOutput;
    +import java.io.IOException;
    +import java.util.List;
    +import java.util.Properties;
    +
    +public class CassandraStore<K, T extends PersistentBase> extends DataStoreBase<K,
T> {
    +
    +  /**
    +   * Consistency property level for Cassandra column families
    +   */
    +  private static final String COL_FAM_CL = "cf.consistency.level";
    +
    +  /**
    +   * Consistency property level for Cassandra read operations.
    +   */
    +  private static final String READ_OP_CL = "read.consistency.level";
    +
    +  /**
    +   * Consistency property level for Cassandra write operations.
    +   */
    +  private static final String WRITE_OP_CL = "write.consistency.level";
    +
    +  public static final Logger LOG = LoggerFactory.getLogger(CassandraStore.class);
    +
    +  private Cluster cluster;
    +
    +  private Session session;
    +
    +  public CassandraStore() {
    +    super();
    +  }
    +
    +  @Override
    +  public void initialize(Class<K> keyClass, Class<T> persistentClass, Properties
properties) {
    --- End diff --
    
    Document method


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message