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

    https://github.com/apache/incubator-usergrid/pull/263#discussion_r31738740
  
    --- Diff: 
stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexIdentifierv2Impl.java
 ---
    @@ -0,0 +1,85 @@
    +/*
    + *
    + *  * Licensed to the Apache Software Foundation (ASF) under one or more
    + *  *  contributor license agreements.  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.  For additional information regarding
    + *  * copyright in this work, please see the NOTICE file in the top level
    + *  * directory of this distribution.
    + *
    + */
    +
    +package org.apache.usergrid.persistence.index.impl;
    +
    +import com.google.inject.Inject;
    +
    +import com.netflix.astyanax.Keyspace;
    +import org.apache.usergrid.persistence.core.util.StringUtils;
    +import org.apache.usergrid.persistence.index.IndexFig;
    +import org.apache.usergrid.persistence.index.IndexIdentifier;
    +
    +
    +/**
    + * Class is used to generate an index name and alias name
    + */
    +public class IndexIdentifierv2Impl implements IndexIdentifier {
    +    private final IndexFig config;
    +    private final String prefix;
    +
    +    @Inject
    +    public IndexIdentifierv2Impl(final Keyspace keyspace, final IndexFig 
config) {
    +        this.config = config;
    +        this.prefix = getPrefix(keyspace, config);
    +    }
    +
    +    private String getPrefix(Keyspace keyspace, IndexFig config) {
    --- End diff --
    
    Can we just take the Fig or a string here instead of the keyspace itself?  
This way our index won't depend on Cass libraries, just a name.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to