[
https://issues.apache.org/jira/browse/GIRAPH-235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408043#comment-13408043
]
Gianmarco De Francisci Morales commented on GIRAPH-235:
-------------------------------------------------------
Yes, I realized the same thing by delving a bit deeper in the code.
I found a satisfactory solution for me:
{code}
@Override
public VertexWriter<I, V, E> createVertexWriter(TaskAttemptContext context)
throws IOException, InterruptedException {
Configuration conf = context.getConfiguration();
Class<?> indexClass =
context.getConfiguration().getClass(GiraphJob.VERTEX_INDEX_CLASS,
LongWritable.class);
Class<?> valueClass =
context.getConfiguration().getClass(GiraphJob.VERTEX_VALUE_CLASS, Text.class);
conf.setClass("mapred.output.key.class", indexClass, Object.class);
conf.setClass("mapred.output.value.class", valueClass, Object.class);
TaskAttemptContext tac = new TaskAttemptContext(conf,
context.getTaskAttemptID());
RecordWriter<I, V> recordWriter =
sequenceFileOutputFormat.getRecordWriter(tac);
return new VertexIdValueWriter<I, V, E>(recordWriter);
}
{code}
This should work reasonably well for all the cases I am targeting.
I will upload a new patch as soon as I clean up the code.
> SequenceFile output format (id-value only)
> ------------------------------------------
>
> Key: GIRAPH-235
> URL: https://issues.apache.org/jira/browse/GIRAPH-235
> Project: Giraph
> Issue Type: New Feature
> Components: lib
> Reporter: Gianmarco De Francisci Morales
> Attachments: GIRAPH-235.1.patch
>
>
> Create a SequenceFileOutputFormat for the cases where compression is
> important and we only want the value of the vertex (e.g. pagerank)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira