/** {@inheritDoc} */ @Override protected boolean accept(IgniteBiTuple<WALPointer, WALRecord> tup) { return !(tup.get2() instanceof PartitionMetaStateRecord); } }
/** {@inheritDoc} */ @Override protected boolean accept(IgniteBiTuple<WALPointer, WALRecord> tup) { return !(tup.get2() instanceof PartitionMetaStateRecord); } }
/** {@inheritDoc} */ @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, @Nullable Void arg) { return absMap(t.get1(), t.get2(), subgrid, lb); } }
/** * @return Written blocks to secondary file system. */ long readBlocksSecondary() { return blocksRead.get2().longValue(); }
/** * @return Write bytes time. */ long writeBytesTime() { return bytesWritten.get2().longValue(); }
@Nullable @Override public Object next() { if (!hasNext()) throw new NoSuchElementException(); Object res = null; if (nextIdx == 1) res = get1(); else if (nextIdx == 2) res = get2(); nextIdx++; return res; }
/** {@inheritDoc} */ @Override public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, @Nullable Void arg) { return absMap(t.get1(), F.asList(t.get2()), subgrid, lb); } }
/** * @param ack Shuffle ack. */ public void onShuffleAck(HadoopShuffleAck ack) { IgniteBiTuple<HadoopShuffleMessage, GridFutureAdapter<?>> tup = sentMsgs.get(ack.id()); if (tup != null) tup.get2().onDone(); else log.warning("Received shuffle ack for not registered shuffle id: " + ack); }
/** {@inheritDoc} */ @Override public WALRecord read(WALPointer ptr) throws IgniteCheckedException, StorageException { try (WALIterator it = replay(ptr)) { IgniteBiTuple<WALPointer, WALRecord> rec = it.next(); if (rec.get1().equals(ptr)) return rec.get2(); else throw new StorageException("Failed to read record by pointer [ptr=" + ptr + ", rec=" + rec + "]"); } }
/** * Adds given numbers to write blocks counters. * * @param total Total number of block written. * @param secondary Number of blocks written to secondary FS. */ void addWriteBlocks(int total, int secondary) { IgniteBiTuple<LongAdder, LongAdder> blocksWritten0 = blocksWritten; blocksWritten0.get1().add(total); blocksWritten0.get2().add(secondary); }
/** * Adds given numbers to written bytes and write time. * * @param writtenBytes Number of bytes written. * @param writeTime Write time. */ void addWrittenBytesTime(long writtenBytes, long writeTime) { IgniteBiTuple<LongAdder, LongAdder> bytesWritten0 = bytesWritten; bytesWritten0.get1().add(writtenBytes); bytesWritten0.get2().add(writeTime); }
/** * Adds given numbers to read blocks counters. * * @param total Total number of blocks read. * @param secondary Number of blocks read form secondary FS. */ void addReadBlocks(int total, int secondary) { IgniteBiTuple<LongAdder, LongAdder> blocksRead0 = blocksRead; blocksRead0.get1().add(total); blocksRead0.get2().add(secondary); }
@Override public void apply(Object k, Object val) { if (convert) { Object v = convert(val); vis.apply(cctx.toCacheKeyObject(k), v); } else { IgniteBiTuple<Object, GridCacheVersion> v = (IgniteBiTuple<Object, GridCacheVersion>)val; if (v != null) verVis.apply(cctx.toCacheKeyObject(k), v.get1(), v.get2()); } } };
/** * @param key Key. * @param oldVal Expected old value. * @param newVal Expected new value. */ private void assertBeforePutValue(String key, @Nullable Object oldVal, @Nullable Object newVal) { IgniteBiTuple t = interceptor.beforePutMap.get(key); assertNotNull(t); assertEquals(t.get1(), oldVal); assertEquals(t.get2(), newVal); }
@Override public Object apply(Ignite ignite) { IgniteBiTuple<Integer, Integer> t = ignite.atomicStamped(STRUCTURE_NAME, 1, 1, false).get(); assert t.get1() > 0; assert t.get2() > 0; return null; } });
@Override public IgfsStatus call() throws Exception { IgniteBiTuple<Long, Long> space = igfsCtx.kernalContext().grid().compute().execute( new IgfsGlobalSpaceTask(name()), null); return new IgfsStatus(space.get1(), space.get2()); } });
/** * @param data Tests data. */ public ServiceDeploymentProcessIdSelfTest(IgniteBiTuple<DiscoveryEvent, AffinityTopologyVersion> data) { this.evt = data.get1(); this.topVer = data.get2(); if (evt instanceof DiscoveryCustomEvent) this.sut = new ServiceDeploymentProcessId(((DiscoveryCustomEvent)evt).customMessage().id()); else this.sut = new ServiceDeploymentProcessId(topVer); }
/** * @param nodeIp Node ip. * @param node Node. * @return {@code True} if addresses are equal, {@code false} otherwise. */ private boolean eqAddresses(IgniteBiTuple<Collection<String>, Collection<String>> nodeIp, GridClientNode node) { return F.eqOrdered(nodeIp.get1(), (Collection<String>)(node.attribute(restAddressAttributeName()))) && F.eqOrdered(nodeIp.get2(), (Collection<String>)(node.attribute(restHostNameAttributeName()))); }