Examples of ZNRecordUpdater


Examples of org.apache.helix.ZNRecordUpdater

  public DataUpdater<ZNRecord> getZNRecordUpdater()
  {
    if(_code == OpCode.SET)

    {
      return new ZNRecordUpdater(_record)
      {
        @Override
        public ZNRecord update(ZNRecord current)
        {
          return _record;
        }
      };
    }
    else if ((_code == OpCode.UPDATE))
    {
      return new ZNRecordUpdater(_record);
    }
    else
    {
      throw new UnsupportedOperationException("Not supported : " + _code);
    }
View Full Code Here

Examples of org.apache.helix.ZNRecordUpdater

                                         "session_0",
                                         "TestDB" + i);
         
          ZNRecord newRecord = new ZNRecord("TestDB" + i);
          newRecord.setSimpleField("" + j, "" + j);
          DataUpdater<ZNRecord> updater = new ZNRecordUpdater(newRecord);
          paths.add(path);
          updaters.add(updater);
        }
       
        boolean[] success = _accessor.updateChildren(paths, updaters, AccessOption.PERSISTENT);
View Full Code Here

Examples of org.apache.helix.ZNRecordUpdater

      for (int i = 0; i < 10; i++)
      {
        String path = curStatePath + "/session_0/TestDB" + i;
        ZNRecord newRecord = new ZNRecord("TestDB" + i);
        newRecord.setSimpleField("" + j, "" + j);
        DataUpdater<ZNRecord> updater = new ZNRecordUpdater(newRecord);
        paths.add(path);
        updaters.add(updater);
      }
      success = accessor.updateChildren(paths, updaters, AccessOption.PERSISTENT);
View Full Code Here

Examples of org.apache.helix.ZNRecordUpdater

      for (int i = 0; i < 10; i++)
      {
        String path = curStatePath + "/session_0/TestDB" + i;
        ZNRecord newRecord = new ZNRecord("TestDB" + i);
        newRecord.setSimpleField("" + j, "" + j);
        DataUpdater<ZNRecord> updater = new ZNRecordUpdater(newRecord);
        paths.add(path);
        updaters.add(updater);
      }
      success = extBaseAccessor.updateChildren(paths, updaters, AccessOption.PERSISTENT);
View Full Code Here

Examples of org.apache.helix.ZNRecordUpdater

      for (int i = 0; i < 10; i++)
      {
        String path = curStatePath + "/session_0/TestDB" + i;
        ZNRecord newRecord = new ZNRecord("TestDB" + i);
        newRecord.setSimpleField("" + j, "" + j);
        DataUpdater<ZNRecord> updater = new ZNRecordUpdater(newRecord);
        paths.add(path);
        updaters.add(updater);
      }
      success = accessor.updateChildren(paths, updaters, AccessOption.PERSISTENT);
View Full Code Here

Examples of org.apache.helix.ZNRecordUpdater

      updaters.clear();
      for (int i = 0; i < 10; i++) {
        String path = curStatePath + "/session_0/TestDB" + i;
        ZNRecord newRecord = new ZNRecord("TestDB" + i);
        newRecord.setSimpleField("" + j, "" + j);
        DataUpdater<ZNRecord> updater = new ZNRecordUpdater(newRecord);
        paths.add(path);
        updaters.add(updater);
      }
      success = extBaseAccessor.updateChildren(paths, updaters, AccessOption.PERSISTENT);
View Full Code Here

Examples of org.apache.helix.ZNRecordUpdater

      updaters.clear();
      for (int i = 0; i < 10; i++) {
        String path = curStatePath + "/session_0/TestDB" + i;
        ZNRecord newRecord = new ZNRecord("TestDB" + i);
        newRecord.setSimpleField("" + j, "" + j);
        DataUpdater<ZNRecord> updater = new ZNRecordUpdater(newRecord);
        paths.add(path);
        updaters.add(updater);
      }
      success = accessor.updateChildren(paths, updaters, AccessOption.PERSISTENT);
View Full Code Here

Examples of org.apache.helix.ZNRecordUpdater

      String path = curStatePath + "/session_0/TestDB" + i;
      for (int j = 0; j < 10; j++) {
        ZNRecord newRecord = new ZNRecord("TestDB" + i);
        newRecord.setSimpleField("" + j, "" + j);
        boolean success =
            accessor.update(path, new ZNRecordUpdater(newRecord), AccessOption.PERSISTENT);
        Assert.assertTrue(success, "Should succeed in update: " + path);

      }
    }
View Full Code Here

Examples of org.apache.helix.ZNRecordUpdater

      for (int j = 0; j < 10; j++) {
        updatePaths.add(path);
        ZNRecord newRecord = new ZNRecord("TestDB" + i);
        newRecord.setSimpleField("" + j, "" + j);
        boolean success =
            accessor.update(path, new ZNRecordUpdater(newRecord), AccessOption.PERSISTENT);
        Assert.assertTrue(success, "Should succeed in update: " + path);
      }
    }
    Thread.sleep(500);
View Full Code Here

Examples of org.apache.helix.ZNRecordUpdater

              PropertyPathConfig.getPath(PropertyType.CURRENTSTATES, _clusterName,
                  "localhost_8901", "session_0", "TestDB" + i);

          ZNRecord newRecord = new ZNRecord("TestDB" + i);
          newRecord.setSimpleField("" + j, "" + j);
          DataUpdater<ZNRecord> updater = new ZNRecordUpdater(newRecord);
          paths.add(path);
          updaters.add(updater);
        }

        boolean[] success = _accessor.updateChildren(paths, updaters, AccessOption.PERSISTENT);
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.