@Override public HadoopIgfsStreamDelegate apply() { IgfsOutputStream stream = igfs.create(path, bufSize, overwrite, colocate ? igfs.nextAffinityKey() : null, replication, blockSize, props); return new HadoopIgfsStreamDelegate(HadoopIgfsInProc.this, stream); } });
/** * @param req Path control request. * @return Affinity key that maps on local node by the time this method is called if replication factor * is {@code 0}, {@code null} otherwise. */ @Nullable private IgniteUuid affinityKey(IgfsPathControlRequest req) { // Do not generate affinity key for replicated or near-only cache. if (!req.colocate()) { if (log.isDebugEnabled()) log.debug("Will not generate affinity key for path control request [igfsName=" + igfs.name() + ", req=" + req + ']'); return null; } IgniteUuid key = igfs.nextAffinityKey(); if (log.isDebugEnabled()) log.debug("Generated affinity key for path control request [igfsName=" + igfs.name() + ", req=" + req + ", key=" + key + ']'); return key; }
/** * @param req Path control request. * @return Affinity key that maps on local node by the time this method is called if replication factor * is {@code 0}, {@code null} otherwise. */ @Nullable private IgniteUuid affinityKey(IgfsPathControlRequest req) { // Do not generate affinity key for replicated or near-only cache. if (!req.colocate()) { if (log.isDebugEnabled()) log.debug("Will not generate affinity key for path control request [igfsName=" + igfs.name() + ", req=" + req + ']'); return null; } IgniteUuid key = igfs.nextAffinityKey(); if (log.isDebugEnabled()) log.debug("Generated affinity key for path control request [igfsName=" + igfs.name() + ", req=" + req + ", key=" + key + ']'); return key; }