• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java StoreFeatures类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures的典型用法代码示例。如果您正苦于以下问题:Java StoreFeatures类的具体用法?Java StoreFeatures怎么用?Java StoreFeatures使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StoreFeatures类属于com.thinkaurelius.titan.diskstorage.keycolumnvalue包,在下文中一共展示了StoreFeatures类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testUnorderedConfiguration

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
@Test
@Category({ UnorderedKeyStoreTests.class })
public void testUnorderedConfiguration() {
    if (!manager.getFeatures().hasUnorderedScan()) {
        log.warn(
            "Can't test key-unordered features on incompatible store.  "
            + "This warning could indicate reduced test coverage and "
            + "a broken JUnit configuration.  Skipping test {}.",
            name.getMethodName());
        return;
    }

    StoreFeatures features = manager.getFeatures();
    assertFalse(features.isKeyOrdered());
    assertFalse(features.hasLocalKeyPartition());
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:17,代码来源:AbstractCassandraStoreTest.java


示例2: testFeaturesImplementation

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
@Test
public void testFeaturesImplementation() {
    StoreFeatures features;

    features = new StandardStoreFeatures.Builder().build();

    assertFalse(features.hasMultiQuery());
    assertFalse(features.hasLocking());
    assertFalse(features.isDistributed());
    assertFalse(features.hasScan());

    features = new StandardStoreFeatures.Builder().locking(true).build();

    assertFalse(features.hasMultiQuery());
    assertTrue(features.hasLocking());
    assertFalse(features.isDistributed());

    features = new StandardStoreFeatures.Builder().multiQuery(true).unorderedScan(true).build();

    assertTrue(features.hasMultiQuery());
    assertTrue(features.hasUnorderedScan());
    assertFalse(features.hasOrderedScan());
    assertTrue(features.hasScan());
    assertFalse(features.isDistributed());
    assertFalse(features.hasLocking());
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:27,代码来源:StorageFeaturesTest.java


示例3: VertexIDAssignerTest

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
/**
 *
 * @param numPartitionsBits The number of partitions bits to use. This means there are exactly (1<<numPartitionBits) partitions.
 * @param partitionMax The maxium number of ids that can be allocated per partition. This is artifically constraint by the MockIDAuthority
 * @param localPartitionDef This array contains three integers: 1+2) lower and upper bounds for the local partition range, and
 *                          3) the bit width of the local bounds. The bounds will be bitshifted forward to consume the bit width
 */
public VertexIDAssignerTest(int numPartitionsBits, int partitionMax, int[] localPartitionDef) {
    MockIDAuthority idAuthority = new MockIDAuthority(11, partitionMax);

    StandardStoreFeatures.Builder fb = new StandardStoreFeatures.Builder();

    if (null != localPartitionDef) {
        fb.localKeyPartition(true);
        idAuthority.setLocalPartition(PartitionIDRangeTest.convert(localPartitionDef[0],localPartitionDef[1],localPartitionDef[2]));
    }
    StoreFeatures features = fb.build();

    ModifiableConfiguration config = GraphDatabaseConfiguration.buildGraphConfiguration();
    config.set(GraphDatabaseConfiguration.CLUSTER_MAX_PARTITIONS,1<<numPartitionsBits);
    idAssigner = new VertexIDAssigner(config, idAuthority, features);
    System.out.println(String.format("Configuration [%s|%s|%s]",numPartitionsBits,partitionMax,Arrays.toString(localPartitionDef)));

    if (localPartitionDef!=null && localPartitionDef[0]<localPartitionDef[1] && localPartitionDef[2]<=numPartitionsBits) {
        this.maxIDAssignments = ((localPartitionDef[1]-localPartitionDef[0])<<(numPartitionsBits-localPartitionDef[2]))*((long)partitionMax);
    } else {
        this.maxIDAssignments = (1<<numPartitionsBits)*((long)partitionMax);
    }
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:30,代码来源:VertexIDAssignerTest.java


示例4: getFeatures

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
@Override
public StoreFeatures getFeatures() {

    Configuration c = GraphDatabaseConfiguration.buildGraphConfiguration();

    StandardStoreFeatures.Builder fb = new StandardStoreFeatures.Builder()
            .orderedScan(true).unorderedScan(true).batchMutation(true)
            .multiQuery(true).distributed(true).keyOrdered(true).storeTTL(true)
            .timestamps(true).preferredTimestamps(PREFERRED_TIMESTAMPS)
            .keyConsistent(c);

    try {
        fb.localKeyPartition(getDeployment() == Deployment.LOCAL);
    } catch (Exception e) {
        logger.warn("Unexpected exception during getDeployment()", e);
    }

    return fb.build();
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:20,代码来源:HBaseStoreManager.java


示例5: getFeatures

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
@Override
public StoreFeatures getFeatures() {

    Configuration c = GraphDatabaseConfiguration.buildConfiguration();

    StandardStoreFeatures.Builder fb = new StandardStoreFeatures.Builder()
            .orderedScan(true).unorderedScan(true).batchMutation(true)
            .multiQuery(true).distributed(true).keyOrdered(true).storeTTL(true)
            .timestamps(true).preferredTimestamps(PREFERRED_TIMESTAMPS)
            .locking(true)
            .keyConsistent(c);

    try {
        fb.localKeyPartition(getDeployment() == Deployment.LOCAL);
    } catch (Exception e) {
        logger.warn("Unexpected exception during getDeployment()", e);
    }

    return fb.build();
}
 
开发者ID:apache,项目名称:incubator-atlas,代码行数:21,代码来源:HBaseStoreManager.java


示例6: VertexIDAssignerTest

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
public VertexIDAssignerTest(Boolean partition, int partitionMax, int[] localPartition) {
    MockIDAuthority idAuthority = new MockIDAuthority(11, partitionMax);

    StandardStoreFeatures.Builder fb = new StandardStoreFeatures.Builder();

    if (null != localPartition) {
        fb.localKeyPartition(true);
        idAuthority.setLocalPartition(localPartition);
    }
    StoreFeatures features = fb.build();

    ModifiableConfiguration config = GraphDatabaseConfiguration.buildConfiguration();
    config.set(GraphDatabaseConfiguration.CLUSTER_PARTITION,partition);
    config.set(GraphDatabaseConfiguration.CLUSTER_MAX_PARTITIONS,1024);
    idAssigner = new VertexIDAssigner(config, idAuthority, features);
    System.out.println("Partition: " + partition);
    System.out.println("partitionMax: " + partitionMax);
    System.out.println("localPartition: " + Arrays.toString(localPartition));
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:20,代码来源:VertexIDAssignerTest.java


示例7: getFeatures

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
@Override
public StoreFeatures getFeatures() {

    Configuration c = GraphDatabaseConfiguration.buildConfiguration();

    StandardStoreFeatures.Builder fb = new StandardStoreFeatures.Builder()
            .orderedScan(true).unorderedScan(true).batchMutation(true)
            .multiQuery(true).distributed(true).keyOrdered(true).storeTTL(true)
            .timestamps(true).preferredTimestamps(PREFERRED_TIMESTAMPS)
            .keyConsistent(c);

    try {
        fb.localKeyPartition(getDeployment() == Deployment.LOCAL);
    } catch (Exception e) {
        logger.warn("Unexpected exception during getDeployment()", e);
    }

    return fb.build();
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:20,代码来源:HBaseStoreManager.java


示例8: getDefaultFeatures

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
private StoreFeatures getDefaultFeatures() {
    StoreFeatures features = new StoreFeatures();

    features.supportsTransactions = true;
    features.isDistributed = false;

    //@todo: figure out what these do, Copied from Berkeley for now
    features.supportsOrderedScan = true;
    features.supportsUnorderedScan = false;
    features.supportsBatchMutation = false;
    features.supportsConsistentKeyOperations = false;
    features.supportsLocking = true;
    features.isKeyOrdered = true;
    features.hasLocalKeyPartition = false;
    features.supportsMultiQuery = false;

    return features;
}
 
开发者ID:thinkaurelius,项目名称:titan-experimental,代码行数:19,代码来源:PersistitStoreManager.java


示例9: testOrderedConfiguration

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
@Test
@Category({ OrderedKeyStoreTests.class })
public void testOrderedConfiguration() {
    if (!manager.getFeatures().hasOrderedScan()) {
        log.warn(
            "Can't test key-ordered features on incompatible store.  "
            + "This warning could indicate reduced test coverage and "
            + "a broken JUnit configuration.  Skipping test {}.",
            name.getMethodName());
        return;
    }

    StoreFeatures features = manager.getFeatures();
    assertTrue(features.isKeyOrdered());
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:16,代码来源:AbstractCassandraStoreTest.java


示例10: testConfiguration

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
@Test
@Category({ OrderedKeyStoreTests.class })
public void testConfiguration() {
    StoreFeatures features = manager.getFeatures();
    assertTrue(features.isKeyOrdered());
    assertTrue(features.hasLocalKeyPartition());
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:8,代码来源:EmbeddedStoreTest.java


示例11: BackendTransaction

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
public BackendTransaction(CacheTransaction storeTx, BaseTransactionConfig txConfig,
                          StoreFeatures features, KCVSCache edgeStore, KCVSCache indexStore,
                          KCVSCache txLogStore, Duration maxReadTime,
                          Map<String, IndexTransaction> indexTx, Executor threadPool) {
    this.storeTx = storeTx;
    this.txConfig = txConfig;
    this.storeFeatures = features;
    this.edgeStore = edgeStore;
    this.indexStore = indexStore;
    this.txLogStore = txLogStore;
    this.maxReadTime = maxReadTime;
    this.indexTx = indexTx;
    this.threadPool = threadPool;
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:15,代码来源:BackendTransaction.java


示例12: getMetaDataSchema

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
public EntryMetaData[] getMetaDataSchema(String storeName) {
    List<EntryMetaData> schemaBuilder = Lists.newArrayList();
    StoreFeatures features = getFeatures();
    if (features.hasTimestamps() && storageConfig.get(STORE_META_TIMESTAMPS,storeName))
        schemaBuilder.add(EntryMetaData.TIMESTAMP);
    if (features.hasCellTTL() && storageConfig.get(STORE_META_TTL,storeName))
        schemaBuilder.add(EntryMetaData.TTL);
    if (features.hasVisibility() && storageConfig.get(STORE_META_VISIBILITY,storeName))
        schemaBuilder.add(EntryMetaData.VISIBILITY);

    if (schemaBuilder.isEmpty()) return StaticArrayEntry.EMPTY_SCHEMA;
    return schemaBuilder.toArray(new EntryMetaData[schemaBuilder.size()]);
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:14,代码来源:AbstractStoreManager.java


示例13: VertexIDAssigner

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
public VertexIDAssigner(Configuration config, IDAuthority idAuthority, StoreFeatures idAuthFeatures) {
    Preconditions.checkNotNull(idAuthority);
    this.idAuthority = idAuthority;


    int partitionBits = NumberUtil.getPowerOf2(config.get(CLUSTER_MAX_PARTITIONS));
    idManager = new IDManager(partitionBits);
    Preconditions.checkArgument(idManager.getPartitionBound() <= Integer.MAX_VALUE && idManager.getPartitionBound()>0);
    this.partitionIdBound = (int)idManager.getPartitionBound();
    hasLocalPartitions = idAuthFeatures.hasLocalKeyPartition();

    placementStrategy = Backend.getImplementationClass(config, config.get(PLACEMENT_STRATEGY),
            REGISTERED_PLACEMENT_STRATEGIES);
    placementStrategy.injectIDManager(idManager);
    log.debug("Partition IDs? [{}], Local Partitions? [{}]",true,hasLocalPartitions);

    long baseBlockSize = config.get(IDS_BLOCK_SIZE);
    idAuthority.setIDBlockSizer(new SimpleVertexIDBlockSizer(baseBlockSize));

    renewTimeoutMS = config.get(IDS_RENEW_TIMEOUT);
    renewBufferPercentage = config.get(IDS_RENEW_BUFFER_PERCENTAGE);

    idPools = new ConcurrentHashMap<Integer, PartitionIDPool>(partitionIdBound);
    schemaIdPool = new StandardIDPool(idAuthority, IDManager.SCHEMA_PARTITION, PoolType.SCHEMA.getIDNamespace(),
            idManager.getSchemaCountBound(), renewTimeoutMS, renewBufferPercentage);
    partitionVertexIdPool = new StandardIDPool(idAuthority, IDManager.PARTITIONED_VERTEX_PARTITION, PoolType.PARTITIONED_VERTEX.getIDNamespace(),
            PoolType.PARTITIONED_VERTEX.getCountBound(idManager), renewTimeoutMS, renewBufferPercentage);
    setLocalPartitions(partitionBits);
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:30,代码来源:VertexIDAssigner.java


示例14: getFeatures

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
public static Features getFeatures(GraphDatabaseConfiguration config, StoreFeatures storageFeatures) {
    Features features = TitanFeatures.getBaselineTitanFeatures();
    features.supportsSerializableObjectProperty = config.hasSerializeAll();
    if (storageFeatures != null) {
        if (storageFeatures.hasScan()) {
            features.supportsVertexIteration = true;
            features.supportsEdgeIteration = true;
        }
    }
    return features;
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:12,代码来源:TitanFeatures.java


示例15: getFeatures

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
@Override
public StoreFeatures getFeatures() {

    if (features == null) {

        Configuration global = GraphDatabaseConfiguration.buildGraphConfiguration()
                .set(CASSANDRA_READ_CONSISTENCY, "QUORUM")
                .set(CASSANDRA_WRITE_CONSISTENCY, "QUORUM")
                .set(METRICS_PREFIX, GraphDatabaseConfiguration.METRICS_SYSTEM_PREFIX_DEFAULT);

        Configuration local = GraphDatabaseConfiguration.buildGraphConfiguration()
                .set(CASSANDRA_READ_CONSISTENCY, "LOCAL_QUORUM")
                .set(CASSANDRA_WRITE_CONSISTENCY, "LOCAL_QUORUM")
                .set(METRICS_PREFIX, GraphDatabaseConfiguration.METRICS_SYSTEM_PREFIX_DEFAULT);

        StandardStoreFeatures.Builder fb = new StandardStoreFeatures.Builder();

        fb.batchMutation(true).distributed(true);
        fb.timestamps(true).cellTTL(true);
        fb.keyConsistent(global, local);

        boolean keyOrdered;

        switch (getPartitioner()) {
            case RANDOM:
                keyOrdered = false;
                fb.keyOrdered(keyOrdered).orderedScan(false).unorderedScan(true);
                break;

            case BYTEORDER:
                keyOrdered = true;
                fb.keyOrdered(keyOrdered).orderedScan(true).unorderedScan(false);
                break;

            default:
                throw new IllegalArgumentException("Unrecognized partitioner: " + getPartitioner());
        }

        switch (getDeployment()) {
            case REMOTE:
                fb.multiQuery(true);
                break;

            case LOCAL:
                fb.multiQuery(true).localKeyPartition(keyOrdered);
                break;

            case EMBEDDED:
                fb.multiQuery(false).localKeyPartition(keyOrdered);
                break;

            default:
                throw new IllegalArgumentException("Unrecognized deployment mode: " + getDeployment());
        }

        features = fb.build();
    }

    return features;
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:61,代码来源:AbstractCassandraStoreManager.java


示例16: testTTLSupported

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
@Test
public void testTTLSupported() throws Exception {
    StoreFeatures features = manager.getFeatures();
    assertTrue(features.hasCellTTL());
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:6,代码来源:AbstractCassandraStoreTest.java


示例17: getFeatures

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
@Override
public StoreFeatures getFeatures() {
    return features;
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:5,代码来源:BerkeleyJEStoreManager.java


示例18: getStoreFeatures

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
public StoreFeatures getStoreFeatures() {
    Preconditions.checkArgument(storeFeatures != null, "Cannot retrieve store features before the storage backend has been initialized");
    return storeFeatures;
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:5,代码来源:GraphDatabaseConfiguration.java


示例19: TitanFeatures

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
private TitanFeatures(StandardTitanGraph graph, StoreFeatures storageFeatures) {
    graphFeatures = new TitanGraphFeatures(storageFeatures.supportsPersistence());
    vertexFeatures = new TitanVertexFeatures();
    edgeFeatures = new TitanEdgeFeatures();
    this.graph = graph;
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:7,代码来源:TitanFeatures.java


示例20: getFeatures

import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures; //导入依赖的package包/类
public static TitanFeatures getFeatures(StandardTitanGraph graph, StoreFeatures storageFeatures) {
    return new TitanFeatures(graph,storageFeatures);
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:4,代码来源:TitanFeatures.java



注:本文中的com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreFeatures类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CertificateUtils类代码示例发布时间:2022-05-22
下一篇:
Java Constants类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap