Load master-slave rule configuration.

@param shardingSchemaName sharding schema name
@return master-slave rule configuration
432411
public MasterSlaveRuleConfiguration loadMasterSlaveRuleConfiguration(final String shardingSchemaName) {
        return new MasterSlaveRuleConfigurationYamlSwapper().swap(YamlEngine.unmarshal(regCenter.getDirectly(configNode.getRulePath(shardingSchemaName)), YamlMasterSlaveRuleConfiguration.class));
    }
424546
public Cassandra.Client getRawClient(final String schema) {
        Cassandra.Client client = null;
        Object pooledConnection;
        pooledConnection = getConnection();
        client = (org.apache.cassandra.thrift.Cassandra.Client) getConnection(pooledConnection);
        try {
            client.set_cql_version(getCqlVersion());
        } catch (Exception e) {
            log.error("Error during borrowing a connection , Caused by: {}.", e);
            throw new KunderaException(e);
        } finally {
            releaseConnection(pooledConnection);
        }
        return client;

    }
953808
public static void main(final String[] args) throws IOException {
        ShardingConfiguration shardingConfig = new ShardingConfigurationLoader().load();
        int port = getPort(args);
        if (null == shardingConfig.getServerConfiguration().getOrchestration()) {
            startWithoutRegistryCenter(shardingConfig.getRuleConfigurationMap(), shardingConfig.getServerConfiguration().getAuthentication(), shardingConfig.getServerConfiguration().getProps(), port);
        } else {
            startWithRegistryCenter(shardingConfig.getServerConfiguration(), shardingConfig.getRuleConfigurationMap().keySet(), shardingConfig.getRuleConfigurationMap(), port);
        }
    }
132871
@Override
    public SchemaManager getSchemaManager(Map<String, Object> puProperties)
    {
        if (schemaManager == null)
        {
            initializePropertyReader();
            setExternalProperties(puProperties);
            schemaManager = new RethinkDBSchemaManager(RethinkDBClientFactory.class.getName(), puProperties,
                    kunderaMetadata);
        }
        return schemaManager;
    }
466076
public alluxio.grpc.MasterInfoOrBuilder getMasterInfoOrBuilder() {
    return masterInfo_ == null ? alluxio.grpc.MasterInfo.getDefaultInstance() : masterInfo_;
  }
696009
public Observable<Tuple2<LoaderType, BucketConfig>> loadConfig(final NetworkAddress seedNode, final String bucket,
                                                                   final String password) {
        LOGGER.debug("Loading Config for bucket {}", bucket);
        return loadConfig(seedNode, bucket, bucket, password);
    }
924905
public synchronized Configuration loadConfiguration() {
    if (configurationBuffer.position(0).readByte() == 1) {
      return new Configuration(
          configurationBuffer.readLong(),
          configurationBuffer.readLong(),
          configurationBuffer.readLong(),
          serializer.readObject(configurationBuffer)
      );
    }
    return null;
  }
1232057
public function loadSchemaFile(): Schema
    {
        if (!file_exists($this->schemaFile)) {
            return new Schema();
        }

        $content = file_get_contents($this->schemaFile);
        $desc = Yaml::parse($content);
        if (empty($desc)) {
            return new Schema();
        }

        $builder = new SchemaBuilder();
        return $builder->build($desc['schema']);
    }
1024511
protected Resource loadSchemaResources() {
        PathMatchingResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
        for (String location : schemas) {
            try {
                Resource[] findings = resourcePatternResolver.getResources(location);

                for (Resource finding : findings) {
                    if (finding.getFilename().endsWith(".xsd") || finding.getFilename().endsWith(".wsdl")) {
                        schemaResources.add(finding);
                    }
                }
            } catch (IOException e) {
                throw new CitrusRuntimeException("Failed to read schema resources for location: " + location, e);
            }
        }

        return schemaResources.get(0);
    }
883626
public static JobManagerSharedServices fromConfiguration(
			Configuration config,
			BlobServer blobServer) throws Exception {

		checkNotNull(config);
		checkNotNull(blobServer);

		final String classLoaderResolveOrder =
			config.getString(CoreOptions.CLASSLOADER_RESOLVE_ORDER);

		final String[] alwaysParentFirstLoaderPatterns = CoreOptions.getParentFirstLoaderPatterns(config);

		final BlobLibraryCacheManager libraryCacheManager =
			new BlobLibraryCacheManager(
				blobServer,
				FlinkUserCodeClassLoaders.ResolveOrder.fromString(classLoaderResolveOrder),
				alwaysParentFirstLoaderPatterns);

		final FiniteDuration timeout;
		try {
			timeout = AkkaUtils.getTimeout(config);
		} catch (NumberFormatException e) {
			throw new IllegalConfigurationException(AkkaUtils.formatDurationParsingErrorMessage());
		}

		final ScheduledExecutorService futureExecutor = Executors.newScheduledThreadPool(
				Hardware.getNumberCPUCores(),
				new ExecutorThreadFactory("jobmanager-future"));

		final StackTraceSampleCoordinator stackTraceSampleCoordinator =
			new StackTraceSampleCoordinator(futureExecutor, timeout.toMillis());
		final int cleanUpInterval = config.getInteger(WebOptions.BACKPRESSURE_CLEANUP_INTERVAL);
		final BackPressureStatsTrackerImpl backPressureStatsTracker = new BackPressureStatsTrackerImpl(
			stackTraceSampleCoordinator,
			cleanUpInterval,
			config.getInteger(WebOptions.BACKPRESSURE_NUM_SAMPLES),
			config.getInteger(WebOptions.BACKPRESSURE_REFRESH_INTERVAL),
			Time.milliseconds(config.getInteger(WebOptions.BACKPRESSURE_DELAY)));

		futureExecutor.scheduleWithFixedDelay(
			backPressureStatsTracker::cleanUpOperatorStatsCache,
			cleanUpInterval,
			cleanUpInterval,
			TimeUnit.MILLISECONDS);

		return new JobManagerSharedServices(
			futureExecutor,
			libraryCacheManager,
			RestartStrategyFactory.createRestartStrategyFactory(config),
			stackTraceSampleCoordinator,
			backPressureStatsTracker,
			blobServer);
	}
847237
public MigrationConfiguration loadMigrationConfiguration(String migrationConfigurationId)
            throws IOException, LightblueException {
        DataFindRequest findRequest = new DataFindRequest("migrationConfiguration", null);
        findRequest.where(Query.withValue("_id", Query.eq, migrationConfigurationId));
        findRequest.select(Projection.includeFieldRecursively("*"));
        LOGGER.debug("Loading configuration");
        return lightblueClient.data(findRequest, MigrationConfiguration.class);
    }
561897
@Override
    protected synchronized void loadConfiguration() throws IOException {
        final ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
        final TypeReference<HashMap<String, String>> typeRef = new TypeReference<HashMap<String, String>>() {};
        namespaces = mapper.readValue(new File(configPath), typeRef);
    }
1136356
public boolean hasDataSourceConfiguration(final String shardingSchemaName) {
        return !Strings.isNullOrEmpty(regCenter.get(configNode.getDataSourcePath(shardingSchemaName)));
    }
458960
public boolean hasRuleConfiguration(final String shardingSchemaName) {
        return !Strings.isNullOrEmpty(regCenter.get(configNode.getRulePath(shardingSchemaName)));
    }
830135
private ManagedSchema getManagedSchema(String tableName, String entityName) {
    ManagedSchema managedSchema = getManagedSchemaFromSchemaMap(tableName,
        entityName);
    if (managedSchema == null) {
      refreshManagedSchemaCache(tableName, entityName);
      managedSchema = getManagedSchemaFromSchemaMap(tableName, entityName);
      if (managedSchema == null) {
        String msg = "Could not find managed schemas for " + tableName + ", "
            + entityName;
        throw new SchemaNotFoundException(msg);
      }
    }
    return managedSchema;
  }
493584
public Schema loadSchema(String schema) {
    try {
      JSONObject rawSchema = new JSONObject(new JSONTokener(schema));
      return SchemaLoader.load(rawSchema);
    } catch (JSONException | SchemaException e) {
      throw new InvalidJsonSchemaException(e);
    }
  }
39736
public ShardingStrategy getTableShardingStrategy(final TableRule tableRule) {
        return null == tableRule.getTableShardingStrategy() ? defaultTableShardingStrategy : tableRule.getTableShardingStrategy();
    }