Examples of addClusterId()


Examples of com.orientechnologies.orient.core.metadata.schema.OClass.addClusterId()

  @Test
  public void insertOperator() {
    final int clId = database.addCluster("anotherdefault");
    final OClass profileClass = database.getMetadata().getSchema().getClass("Account");
    profileClass.addClusterId(clId);

    int addressId = database.getMetadata().getSchema().getClass("Address").getDefaultClusterId();

    List<OClusterPosition> positions = getValidPositions(addressId);
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.addClusterId()

    int cid = db.getClusterIdByName(name); // undocumented: if cluster not exists, returns -1
    if (cid == -1) {
      cid = db.addCluster(name);
      final OSchema schema = db.getMetadata().getSchema();
      final OClass type = schema.getClass(DB_CLASS);
      type.addClusterId(cid);
      log.info("Created new journal cluster; id: {}, name: {}", cid, name);
    }
    else {
      log.debug("Journal cluster exists; id: {}, name: {}", cid, name);
    }
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.addClusterId()

    OSchema schema = db.getMetadata().getSchema();
    OClass classOne = schema.createClass("ClassOne");
    OClass classTwo = schema.createClass("ClassTwo");

    final int clusterId = db.addCluster("classthree");
    classTwo.addClusterId(clusterId);

    ODocument document = new ODocument("ClassTwo");
    document.save("classthree");

    document = new ODocument("ClassTwo");
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.addClusterId()

    oclass.createIndex(className + "index1", OClass.INDEX_TYPE.NOTUNIQUE, "key");

    database.newInstance(className).field("key", "a").field("value", 1).save();

    int clId = database.addCluster(className + "secondCluster");
    oclass.addClusterId(clId);

    database.newInstance(className).field("key", "a").field("value", 2).save(className + "secondCluster");

    // when
    database.command(new OCommandSQL("rebuild index " + className + "index1")).execute();
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClassImpl.addClusterId()

          classClusterIds = classClusterIds.substring(1, classClusterIds.length() - 1);

          // ASSIGN OTHER CLUSTER IDS
          for (int i : OStringSerializerHelper.splitIntArray(classClusterIds)) {
            if (i != -1)
              cls.addClusterId(i);
          }
        }

        String value;
        while (jsonReader.lastChar() == ',') {
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.wal.HLogKey.addClusterId()

        // Don't replicate catalog entries, if the WALEdit wasn't
        // containing anything to replicate and if we're currently not set to replicate
        if (!logKey.getTablename().equals(TableName.META_TABLE_NAME) &&
            edit.size() != 0) {
          //Mark that the current cluster has the change
          logKey.addClusterId(clusterId);
          currentNbOperations += countDistinctRowKeys(edit);
          currentNbEntries++;
          currentSize += entry.getEdit().heapSize();
        } else {
          this.metrics.incrLogEditsFiltered();
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.wal.HLogKey.addClusterId()

        // Don't replicate catalog entries, if the WALEdit wasn't
        // containing anything to replicate and if we're currently not set to replicate
        if (!logKey.getTablename().equals(TableName.META_TABLE_NAME) &&
            edit.size() != 0) {
          //Mark that the current cluster has the change
          logKey.addClusterId(clusterId);
          currentNbOperations += countDistinctRowKeys(edit);
          entries.add(entry);
          currentSize += entry.getEdit().heapSize();
        } else {
          this.metrics.incrLogEditsFiltered();
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.wal.HLogKey.addClusterId()

        // Don't replicate catalog entries, if the WALEdit wasn't
        // containing anything to replicate and if we're currently not set to replicate
        if (!logKey.getTablename().equals(TableName.META_TABLE_NAME) &&
            edit.size() != 0) {
          //Mark that the current cluster has the change
          logKey.addClusterId(clusterId);
          currentNbOperations += countDistinctRowKeys(edit);
          entries.add(entry);
          currentSize += entry.getEdit().heapSize();
        } else {
          this.metrics.incrLogEditsFiltered();
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.wal.HLogKey.addClusterId()

        // Don't replicate catalog entries, if the WALEdit wasn't
        // containing anything to replicate and if we're currently not set to replicate
        if (!logKey.getTablename().equals(TableName.META_TABLE_NAME) &&
            edit.size() != 0) {
          //Mark that the current cluster has the change
          logKey.addClusterId(clusterId);
          currentNbOperations += countDistinctRowKeys(edit);
          entries.add(entry);
          currentSize += entry.getEdit().heapSize();
        } else {
          this.metrics.incrLogEditsFiltered();
View Full Code Here

Examples of org.apache.hadoop.hbase.regionserver.wal.HLogKey.addClusterId()

        // Don't replicate catalog entries, if the WALEdit wasn't
        // containing anything to replicate and if we're currently not set to replicate
        if (!logKey.getTablename().equals(TableName.META_TABLE_NAME) &&
            edit.size() != 0) {
          //Mark that the current cluster has the change
          logKey.addClusterId(clusterId);
          currentNbOperations += countDistinctRowKeys(edit);
          entries.add(entry);
          currentSize += entry.getEdit().heapSize();
        } else {
          this.metrics.incrLogEditsFiltered();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.