@Override public void process(TitanVertex vertex, ScanMetrics metrics) { PreloadedVertex v = (PreloadedVertex) vertex; if (vertexMemory != null) { VertexMemoryHandler vh = new VertexMemoryHandler(vertexMemory, v); v.setPropertyMixing(vh); } v.setAccessCheck(MAPREDUCE_CHECK); if (idManager.isPartitionedVertex(v.longId()) && !idManager.isCanonicalVertexId(v.longId())) { return; //Only consider the canonical partition vertex representative } else { for (Map.Entry<MapReduce, FulgoraMapEmitter> mapJob : mapJobs.entrySet()) { MapReduce job = mapJob.getKey(); try { job.map(v, mapJob.getValue()); metrics.incrementCustom(MAP_JOB_SUCCESS); } catch (Throwable ex) { log.error("Encountered exception executing map job [" + job + "] on vertex [" + vertex + "]:", ex); metrics.incrementCustom(MAP_JOB_FAILURE); } } } }
@Override public void process(JanusGraphVertex vertex, ScanMetrics metrics) { final PreloadedVertex v = (PreloadedVertex) vertex; if (vertexMemory != null) { VertexMemoryHandler vh = new VertexMemoryHandler(vertexMemory, v); v.setPropertyMixing(vh); } v.setAccessCheck(MAPREDUCE_CHECK); if (idManager.isPartitionedVertex(v.longId()) && !idManager.isCanonicalVertexId(v.longId())) { return; //Only consider the canonical partition vertex representative } for (Map.Entry<MapReduce, FulgoraMapEmitter> mapJob : mapJobs.entrySet()) { final MapReduce job = mapJob.getKey(); try { job.map(v, mapJob.getValue()); metrics.incrementCustom(MAP_JOB_SUCCESS); } catch (Throwable ex) { log.error("Encountered exception executing map job [" + job + "] on vertex [" + vertex + "]:", ex); metrics.incrementCustom(MAP_JOB_FAILURE); } } }
private void processNext() { this.mapReduce.map(ComputerGraph.mapReduce(this.inputIterator.next()._2().get()), this.mapIteratorEmitter); }
@Override public void map(final NullWritable key, final VertexWritable value, final Mapper<NullWritable, VertexWritable, ObjectWritable, ObjectWritable>.Context context) throws IOException, InterruptedException { this.mapEmitter.setContext(context); this.mapReduce.map(ComputerGraph.mapReduce(value.get()), this.mapEmitter); }
final Vertex vertex = vertices.next(); if (null == vertex) break; workerMapReduce.map(ComputerGraph.mapReduce(vertex), mapEmitter);
private void processNext() { this.mapReduce.map(ComputerGraph.mapReduce(this.inputIterator.next()._2().get()), this.mapIteratorEmitter); }
@Override public void map(final NullWritable key, final VertexWritable value, final Mapper<NullWritable, VertexWritable, ObjectWritable, ObjectWritable>.Context context) throws IOException, InterruptedException { this.mapEmitter.setContext(context); this.mapReduce.map(ComputerGraph.mapReduce(value.get()), this.mapEmitter); }
@Override public void process(TitanVertex vertex, ScanMetrics metrics) { PreloadedVertex v = (PreloadedVertex) vertex; if (vertexMemory != null) { VertexMemoryHandler vh = new VertexMemoryHandler(vertexMemory, v); v.setPropertyMixing(vh); } v.setAccessCheck(MAPREDUCE_CHECK); if (idManager.isPartitionedVertex(v.longId()) && !idManager.isCanonicalVertexId(v.longId())) { return; //Only consider the canonical partition vertex representative } else { for (Map.Entry<MapReduce, FulgoraMapEmitter> mapJob : mapJobs.entrySet()) { MapReduce job = mapJob.getKey(); try { job.map(v, mapJob.getValue()); metrics.incrementCustom(MAP_JOB_SUCCESS); } catch (Throwable ex) { log.error("Encountered exception executing map job [" + job + "] on vertex [" + vertex + "]:", ex); metrics.incrementCustom(MAP_JOB_FAILURE); } } } }
final Vertex vertex = vertices.next(); if (null == vertex) break; workerMapReduce.map(ComputerGraph.mapReduce(vertex), mapEmitter);
final Vertex vertex = vertices.next(); if (null == vertex) break; workerMapReduce.map(ComputerGraph.mapReduce(vertex), mapEmitter);