Load a MultiLayerNetwork for the given checkpoint number

@param rootDir       The directory that the checkpoint resides in
@param checkpointNum Checkpoint model to load
@return The loaded model
188851
public static MultiLayerNetwork loadCheckpointMLN(File rootDir, int checkpointNum){
        File f = getFileForCheckpoint(rootDir, checkpointNum);
        try {
            return ModelSerializer.restoreMultiLayerNetwork(f, true);
        } catch (IOException e){
            throw new RuntimeException(e);
        }
    }
1177491
public static PactDslJsonRootValue numberType(Number number) {
    PactDslJsonRootValue value = new PactDslJsonRootValue();
    value.setValue(number);
    value.setMatcher(TypeMatcher.INSTANCE);
    return value;
  }
773898
public static HttpFileService forClassPath(ClassLoader classLoader, String rootDir) {
        return HttpFileServiceBuilder.forClassPath(classLoader, rootDir).build();
    }
572459
private static GetConfigurationPResponse loadConfiguration(InetSocketAddress address,
      AlluxioConfiguration conf) throws AlluxioStatusException {
    GrpcChannel channel = null;
    try {
      LOG.info("Alluxio client (version {}) is trying to load configuration from meta master {}",
          RuntimeConstants.VERSION, address);
      channel = GrpcChannelBuilder.newBuilder(new GrpcServerAddress(address), conf)
          .disableAuthentication().build();
      MetaMasterConfigurationServiceGrpc.MetaMasterConfigurationServiceBlockingStub client =
          MetaMasterConfigurationServiceGrpc.newBlockingStub(channel);
      GetConfigurationPResponse response = client.getConfiguration(
          GetConfigurationPOptions.newBuilder().setRawValue(true).build());
      LOG.info("Alluxio client has loaded configuration from meta master {}", address);
      return response;
    } catch (io.grpc.StatusRuntimeException e) {
      throw new UnavailableException(String.format(
          "Failed to handshake with master %s to load cluster default configuration values: %s",
          address, e.getMessage()), e);
    } catch (UnauthenticatedException e) {
      throw new RuntimeException(String.format(
          "Received authentication exception during boot-strap connect with host:%s", address),
          e);
    } finally {
      if (channel != null) {
        channel.shutdown();
      }
    }
  }
392933
public InetAddress replicaNodeForId(final String id, int replicaNum) {
        if (replicaNum < 1 || replicaNum > 3) {
            throw new IllegalArgumentException("Replica number must be between 1 and 3.");
        }

        BucketConfig config = bucketConfig.get();

        if (config instanceof CouchbaseBucketConfig) {
            CouchbaseBucketConfig cbc = (CouchbaseBucketConfig) config;
            int partitionId = (int) hashId(id) & cbc.numberOfPartitions() - 1;
            int nodeId = cbc.nodeIndexForReplica(partitionId, replicaNum - 1, false);
            if (nodeId == -1) {
                throw new IllegalStateException("No partition assigned to node for Document ID: " + id);
            }
            if (nodeId == -2) {
                throw new IllegalStateException("Replica not configured for this bucket.");
            }
            try {
                return InetAddress.getByName(cbc.nodeAtIndex(nodeId).hostname().address());
            } catch (UnknownHostException e) {
                throw new IllegalStateException(e);
            }
        }  else {
            throw new UnsupportedOperationException("Bucket type not supported: " + config.getClass().getName());
        }
    }
298643
public void loadTopology() {
        if (fake) {
            getView().updateHosts(deriveGroups(generateFakeDomain()), hostIndex);
        } else {
            Outcome<FunctionContext> outcome = new Outcome<FunctionContext>() {
                @Override
                public void onFailure(final FunctionContext context) {
                    Console.error("Unable to load topology", context.getErrorMessage()); // TODO i18n
                }

                @Override
                public void onSuccess(final FunctionContext context) {
                    List<HostInfo> hosts = context.pop();
                    getView().updateHosts(deriveGroups(hosts), hostIndex);
                }
            };
            new Async<FunctionContext>(Footer.PROGRESS_ELEMENT).waterfall(new FunctionContext(), outcome,
                    new TopologyFunctions.ReadHostsAndGroups(dispatcher),
                    new TopologyFunctions.ReadServerConfigs(dispatcher, beanFactory),
                    new TopologyFunctions.FindRunningServerInstances(dispatcher));
        }
    }
808128
public static Checkpoint lastCheckpoint(File rootDir){
        List<Checkpoint> all = availableCheckpoints(rootDir);
        if(all.isEmpty()){
            return null;
        }
        return all.get(all.size()-1);
    }
529036
protected synchronized void checkpoint(long forcedLogSequenceNumber)
                    throws ObjectManagerException
    {
        throw new InvalidStateException(this, InternalTransaction.stateTerminated, InternalTransaction.stateNames[InternalTransaction.stateTerminated]);
    }
97363
private VectorServerLayer searchLayer(MapPresenter mapPresenter, String layerId) {
		if (layerId != null) {
			for (int i = 0; i < mapPresenter.getLayersModel().getLayerCount(); i++) {
				Layer layer = mapPresenter.getLayersModel().getLayer(i);
				if (layer instanceof VectorServerLayer) {
					VectorServerLayer serverLayer = (VectorServerLayer) layer;
					if (layerId.equals(serverLayer.getServerLayerId())) {
						return (VectorServerLayer) layer;
					}
				}
			}
		}
		return null;
	}
634531
public int getZoneNaryForNodesPartition(int zoneId, int nodeId, int partitionId) {
        if(cluster.getNodeById(nodeId).getZoneId() != zoneId) {
            throw new VoldemortException("Node " + nodeId + " is not in zone " + zoneId
                                         + "! The node is in zone "
                                         + cluster.getNodeById(nodeId).getZoneId());
        }

        List<Integer> replicatingNodeIds = getReplicationNodeList(partitionId);
        int zoneNAry = -1;
        for(int replicatingNodeId: replicatingNodeIds) {
            Node replicatingNode = cluster.getNodeById(replicatingNodeId);
            // bump up the replica number once you encounter a node in the given
            // zone
            if(replicatingNode.getZoneId() == zoneId) {
                zoneNAry++;
            }
            if(replicatingNodeId == nodeId) {
                return zoneNAry;
            }
        }
        if(zoneNAry > 0) {
            throw new VoldemortException("Node " + nodeId + " not a replica for partition "
                                         + partitionId + " in given zone " + zoneId);
        } else {
            throw new VoldemortException("Could not find any replicas for partition Id "
                                         + partitionId + " in given zone " + zoneId);
        }
    }
455300
private <T> T loadRequiredModel(Class<T> clzz, String location) throws MojoExecutionException {
        return ModelLoaderUtils.loadModel(clzz, getResourceLocation(location));
    }
745699
private function mergeDevAutoload(RootPackageInterface $root)
    {
        if ( ! empty($autoload = $this->getPackage()->getDevAutoload())) {
            static::unwrapIfNeeded($root, 'setDevAutoload')
                ->setDevAutoload(array_merge_recursive(
                    $root->getDevAutoload(), Util::fixRelativePaths($this->getPath(), $autoload)
                ));
        }
    }
132997
protected DecisionRequirementsDefinitionEntity loadDecisionRequirementsDefinition(String decisionRequirementsDefinitionId) {
    ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration();
    DeploymentCache deploymentCache = configuration.getDeploymentCache();

    DecisionRequirementsDefinitionEntity decisionRequirementsDefinition = deploymentCache.findDecisionRequirementsDefinitionFromCache(decisionRequirementsDefinitionId);

    if (decisionRequirementsDefinition == null) {
      CommandContext commandContext = Context.getCommandContext();
      DecisionRequirementsDefinitionManager manager = commandContext.getDecisionRequirementsDefinitionManager();
      decisionRequirementsDefinition = manager.findDecisionRequirementsDefinitionById(decisionRequirementsDefinitionId);

      if (decisionRequirementsDefinition != null) {
        decisionRequirementsDefinition = deploymentCache.resolveDecisionRequirementsDefinition(decisionRequirementsDefinition);
      }
    }

    return decisionRequirementsDefinition;
  }
502810
public static ComputationGraph loadCheckpointCG(File rootDir, Checkpoint checkpoint){
        return loadCheckpointCG(rootDir, checkpoint.getCheckpointNum());
    }
145
public static String getTerminRoot(Long channelId, Long pipelineId) {
        // 根据channelId , pipelineId构造path
        return MessageFormat.format(ArbitrateConstants.NODE_TERMIN_ROOT,
            String.valueOf(channelId),
            String.valueOf(pipelineId));
    }
976121
function (callback) {

    var self = this;

    var warnings = null;


    async.series([
      // load domain files...
      function (callback) {
        debug('load domain files..');
        self.structureLoader(self.options.domainPath, self.validatorExtension, self.options.useLoaderExtensions, function (err, tree, warns) {
          if (err) {
            return callback(err);
          }
          warnings = warns;

          if (!tree || _.isEmpty(tree)) return callback(new Error('No structure loaded for ' + self.options.domainPath + '!'));

          self.tree = attachLookupFunctions(tree);
          callback(null);
        });
      },

      // prepare infrastructure...
      function (callback) {
        debug('prepare infrastructure...');
        async.parallel([

          // prepare eventStore...
          function (callback) {
            debug('prepare eventStore...');

            self.eventStore.on('connect', function () {
              self.emit('connect');
            });

            self.eventStore.on('disconnect', function () {
              self.emit('disconnect');
            });

            self.eventStore.init(callback);
          },

          // prepare aggregateLock...
          function (callback) {
            debug('prepare aggregateLock...');

            self.aggregateLock.on('connect', function () {
              self.emit('connect');
            });

            self.aggregateLock.on('disconnect', function () {
              self.emit('disconnect');
            });

            self.aggregateLock.connect(callback);
          },

          // prepare commandBumper...
          function (callback) {
            if (!self.commandBumper) {
              return callback(null);
            }
            debug('prepare commandBumper...');

            self.commandBumper.on('connect', function () {
              self.emit('connect');
            });

            self.commandBumper.on('disconnect', function () {
              self.emit('disconnect');
            });

            self.commandBumper.connect(callback);
          }
        ], callback);
      },

      // inject all needed dependencies...
      function (callback) {
        debug('inject all needed dependencies...');

        self.commandDispatcher = new CommandDispatcher(self.tree, self.definitions.command, self.commandBumper);
        self.tree.defineOptions({
            retryOnConcurrencyTimeout: self.options.retryOnConcurrencyTimeout,
            snapshotThreshold: self.options.snapshotThreshold,
            snapshotThresholdMs: self.options.snapshotThresholdMs
          })
          .defineCommand(self.definitions.command)
          .defineEvent(self.definitions.event)
          .idGenerator(self.getNewId)
          .useEventStore(self.eventStore)
          .useAggregateLock(self.aggregateLock);

        if (self.getNewAggregateId) {
          self.tree.aggregateIdGenerator(self.getNewAggregateId);
        }

        callback(null);
      }
    ], function (err) {
      if (err) {
        debug(err);
      } else {
        debug('domain inited');
      }
      if (callback) callback(err, warnings);
    });
  }
855386
public static PoliciesCache fromDir(File rootDir, final Set<Attribute> forcedContext) {
        return fromSourceProvider(YamlProvider.getDirProvider(rootDir),forcedContext);
    }