Examples of updateProperty()


Examples of com.linkedin.helix.DataAccessor.updateProperty()

    config = accessor.getProperty(InstanceConfig.class, PropertyType.CONFIGS,
        ConfigScopeProperty.PARTICIPANT.toString(), "key0");
    AssertJUnit.assertEquals("id0", config.getId());

    InstanceConfig newConfig = new InstanceConfig("id1");
    accessor.updateProperty(PropertyType.CONFIGS, newConfig,
        ConfigScopeProperty.PARTICIPANT.toString(),
        "key0");
    config = accessor.getProperty(InstanceConfig.class, PropertyType.CONFIGS,
        ConfigScopeProperty.PARTICIPANT.toString(), "key0");
    AssertJUnit.assertEquals("id1", config.getId());
View Full Code Here

Examples of com.linkedin.helix.HelixDataAccessor.updateProperty()

                              sessionId,
                              resource,
                              bucketizer.getBucketName(partitionKey));
      if (!_message.getGroupMessageMode())
      {
        accessor.updateProperty(key, _currentStateDelta);
      }
      else
      {
        _executor._groupMsgHandler.addCurStateUpdate(_message, key, _currentStateDelta);
      }
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.persist.Store.updateProperty()

              break;
            }
            if (((String)o).equals(ClusterGlobals.STORE_PROPERTY_LASTREFRESHTIME)) {
                logger.log(Logger.WARNING, BrokerResources.W_CLUSTER_LOAD_LASTREFRESHTIME, le);
                try {
                s.updateProperty(ClusterGlobals.STORE_PROPERTY_LASTREFRESHTIME, new Long(-1), false);
                } catch (BrokerException e) {
                logger.log(Logger.ERROR, BrokerResources.E_CLUSTER_RESET_LASTREFRESHTIME, e);
                bad = true;
                break;
                };
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.persist.file.FileStore.updateProperty()

            // Properties table
            Properties properties = jdbcStore.getAllProperties();
            Iterator propItr = properties.entrySet().iterator();
            while (propItr.hasNext()) {
                Map.Entry entry = (Map.Entry)propItr.next();
                fileStore.updateProperty(
                    (String)entry.getKey(), entry.getValue(), false);

            }
            propItr = null; properties = null;
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.persist.file.FileStore.updateProperty()

            consumerArray = null;

            // Broker & Session table - store all HABrokerInfo as a property
            HashMap bkrMap = jdbcStore.getAllBrokerInfos(true);
            List haBrokers = new ArrayList(bkrMap.values());
            fileStore.updateProperty(STORE_PROPERTY_HABROKERS, haBrokers, true);

            /*
             * For each broker in the cluster, we will store broker specific
             * data, destinations, messages, transactions, acknowledgements
             * in their own filestore (a.k.a broker filestore).
View Full Code Here

Examples of org.apache.helix.HelixDataAccessor.updateProperty()

                              sessionId,
                              resource,
                              bucketizer.getBucketName(partitionKey));
      if (!_message.getGroupMessageMode())
      {
        accessor.updateProperty(key, _currentStateDelta);
      }
      else
      {
        _executor._groupMsgHandler.addCurStateUpdate(_message, key, _currentStateDelta);
      }
View Full Code Here

Examples of org.apache.helix.HelixDataAccessor.updateProperty()

    if (code == ErrorCode.ERROR)
    {
      currentStateDelta.setState(partition, "ERROR");
      _stateModel.updateState("ERROR");

      accessor.updateProperty(keyBuilder.currentState(instanceName,
                                                      _message.getTgtSessionId(),
                                                      resourceName),
                              currentStateDelta);
    }
  }
View Full Code Here

Examples of org.apache.helix.HelixDataAccessor.updateProperty()

          // TODO: changed to async update
          // group update current state
          Map<PropertyKey, CurrentState> curStateMap = info.merge();
          for (PropertyKey key : curStateMap.keySet())
          {
            accessor.updateProperty(key, curStateMap.get(key));
          }

          // remove group message
          removeMessageFromZk(accessor, _message);
          reportMessageStat(_manager, _message, taskResult);
View Full Code Here

Examples of org.apache.helix.HelixDataAccessor.updateProperty()

    LiveInstance instance = helixDataAccessor.getProperty(propertyKey);

    Map<String, String> map = new TreeMap<String, String>();
    map.put("k1", "v1");
    instance.getRecord().setMapField("test", map);
    Assert.assertTrue(helixDataAccessor.updateProperty(propertyKey, instance),
                      "Failed to update live instance node");

    instances = changeList.poll(1, TimeUnit.SECONDS);
    Assert.assertNotNull(instances, "Expecting a list of live instance");
    Assert.assertEquals(instances.get(0).getRecord().getMapField("test"),
View Full Code Here

Examples of org.apache.helix.HelixDataAccessor.updateProperty()

                                   accessor);

        // Mark message state UNPROCESSABLE if we hit an exception in creating
        // message handler. The message will stay on zookeeper but will not be processed
        message.setMsgState(MessageState.UNPROCESSABLE);
        accessor.updateProperty(message.getKey(keyBuilder, instanceName), message);
        continue;
      }

      // update msgState to read
      message.setMsgState(MessageState.READ);
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.