/** * Run client task. * * @param task Task. * @return Result. */ <T> T runClientTask(IgfsClientAbstractCallable<T> task) { try { return (cfg.isColocateMetadata()) ? clientCompute().affinityCall(metaCacheName, IgfsUtils.ROOT_ID, task) : clientCompute().call(task); } catch (Exception e) { if (X.hasCause(e, ClusterTopologyException.class)) throw new IgfsException("Failed to execute operation because there are no IGFS metadata nodes." , e); IgfsException igfsEx = X.cause(e, IgfsException.class); if (igfsEx != null) throw igfsEx; throw e; } }
if (igfsCfg.isColocateMetadata() && ccfgMeta.getAffinityMapper() == null) ccfgMeta.setAffinityMapper(new IgfsColocatedMetadataAffinityKeyMapper());
/** * Create data transfer object for IGFS configuration properties. * @param igfs IGFS configuration. */ public VisorIgfsConfiguration(FileSystemConfiguration igfs) { name = igfs.getName(); metaCacheName = igfs.getMetaCacheConfiguration().getName(); dataCacheName = igfs.getDataCacheConfiguration().getName(); blockSize = igfs.getBlockSize(); prefetchBlocks = igfs.getPrefetchBlocks(); streamBufSize = igfs.getBufferSize(); perNodeBatchSize = igfs.getPerNodeBatchSize(); perNodeParallelBatchCnt = igfs.getPerNodeParallelBatchCount(); dfltMode = igfs.getDefaultMode(); pathModes = igfs.getPathModes(); maxTaskRangeLen = igfs.getMaximumTaskRangeLength(); fragmentizerConcurrentFiles = igfs.getFragmentizerConcurrentFiles(); fragmentizerEnabled = igfs.isFragmentizerEnabled(); fragmentizerThrottlingBlockLen = igfs.getFragmentizerThrottlingBlockLength(); fragmentizerThrottlingDelay = igfs.getFragmentizerThrottlingDelay(); IgfsIpcEndpointConfiguration endpointCfg = igfs.getIpcEndpointConfiguration(); ipcEndpointCfg = endpointCfg != null ? endpointCfg.toString() : null; ipcEndpointEnabled = igfs.isIpcEndpointEnabled(); mgmtPort = igfs.getManagementPort(); seqReadsBeforePrefetch = igfs.getSequentialReadsBeforePrefetch(); colocateMeta = igfs.isColocateMetadata(); relaxedConsistency = igfs.isRelaxedConsistency(); updateFileLenOnFlush = igfs.isUpdateFileLengthOnFlush(); }
colocateMeta = cfg.isColocateMetadata(); dataCacheCfg = cfg.getDataCacheConfiguration(); dfltMode = cfg.getDefaultMode();
/** * Run client task. * * @param task Task. * @return Result. */ <T> T runClientTask(IgfsClientAbstractCallable<T> task) { try { return (cfg.isColocateMetadata()) ? clientCompute().affinityCall(metaCacheName, IgfsUtils.ROOT_ID, task) : clientCompute().call(task); } catch (Exception e) { if (X.hasCause(e, ClusterTopologyException.class)) throw new IgfsException("Failed to execute operation because there are no IGFS metadata nodes." , e); IgfsException igfsEx = X.cause(e, IgfsException.class); if (igfsEx != null) throw igfsEx; throw e; } }
if (igfsCfg.isColocateMetadata() && ccfgMeta.getAffinityMapper() == null) ccfgMeta.setAffinityMapper(new IgfsColocatedMetadataAffinityKeyMapper());
colocateMeta = cfg.isColocateMetadata(); dataCacheCfg = cfg.getDataCacheConfiguration(); dfltMode = cfg.getDefaultMode();
/** * Create data transfer object for IGFS configuration properties. * @param igfs IGFS configuration. */ public VisorIgfsConfiguration(FileSystemConfiguration igfs) { name = igfs.getName(); metaCacheName = igfs.getMetaCacheConfiguration().getName(); dataCacheName = igfs.getDataCacheConfiguration().getName(); blockSize = igfs.getBlockSize(); prefetchBlocks = igfs.getPrefetchBlocks(); streamBufSize = igfs.getBufferSize(); perNodeBatchSize = igfs.getPerNodeBatchSize(); perNodeParallelBatchCnt = igfs.getPerNodeParallelBatchCount(); dfltMode = igfs.getDefaultMode(); pathModes = igfs.getPathModes(); maxTaskRangeLen = igfs.getMaximumTaskRangeLength(); fragmentizerConcurrentFiles = igfs.getFragmentizerConcurrentFiles(); fragmentizerEnabled = igfs.isFragmentizerEnabled(); fragmentizerThrottlingBlockLen = igfs.getFragmentizerThrottlingBlockLength(); fragmentizerThrottlingDelay = igfs.getFragmentizerThrottlingDelay(); IgfsIpcEndpointConfiguration endpointCfg = igfs.getIpcEndpointConfiguration(); ipcEndpointCfg = endpointCfg != null ? endpointCfg.toString() : null; ipcEndpointEnabled = igfs.isIpcEndpointEnabled(); mgmtPort = igfs.getManagementPort(); seqReadsBeforePrefetch = igfs.getSequentialReadsBeforePrefetch(); colocateMeta = igfs.isColocateMetadata(); relaxedConsistency = igfs.isRelaxedConsistency(); updateFileLenOnFlush = igfs.isUpdateFileLengthOnFlush(); }