giraph-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GIRAPH-717) HiveJythonRunner with support for pure Jython value types.
Date Wed, 31 Jul 2013 19:41:48 GMT

    [ https://issues.apache.org/jira/browse/GIRAPH-717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13725641#comment-13725641
] 

Hudson commented on GIRAPH-717:
-------------------------------

SUCCESS: Integrated in Giraph-trunk-Commit #1215 (See [https://builds.apache.org/job/Giraph-trunk-Commit/1215/])
GIRAPH-717: HiveJythonRunner with support for pure Jython value types (nitay) (nitay: http://git-wip-us.apache.org/repos/asf?p=giraph.git&a=commit&h=d419f8f4f84723e1eadce96168414de9f3ce5677)
* findbugs-exclude.xml
* giraph-core/src/main/java/org/apache/giraph/conf/GiraphClasses.java
* giraph-core/src/main/java/org/apache/giraph/factories/EdgeValueFactory.java
* giraph-core/src/main/java/org/apache/giraph/types/DoubleToDoubleWritableWrapper.java
* giraph-core/src/main/java/org/apache/giraph/types/LongToLongWritableWrapper.java
* giraph-hive/src/test/java/org/apache/giraph/hive/GiraphHiveTestBase.java
* giraph-core/src/main/java/org/apache/giraph/jython/JythonUtils.java
* giraph-core/src/test/java/org/apache/giraph/master/TestComputationCombinerTypes.java
* giraph-core/src/main/java/org/apache/giraph/jython/JythonComputationFactory.java
* giraph-hive/src/main/java/org/apache/giraph/hive/jython/JythonHiveToVertex.java
* giraph-core/src/main/java/org/apache/giraph/utils/ReflectionUtils.java
* giraph-hive/src/main/java/org/apache/giraph/hive/types/TypedValueWriter.java
* giraph-hive/src/main/java/org/apache/giraph/hive/types/HiveVertexIdWriter.java
* giraph-core/src/main/java/org/apache/giraph/factories/DefaultEdgeValueFactory.java
* giraph-hive/src/test/resources/org/apache/giraph/jython/fake-label-propagation-worker.py
* giraph-hive/src/main/java/org/apache/giraph/hive/jython/JythonVertexToHive.java
* giraph-hive/src/main/java/org/apache/giraph/hive/primitives/PrimitiveValueReader.java
* giraph-core/src/main/java/org/apache/giraph/jython/factories/JythonVertexValueFactory.java
* giraph-hive/src/test/resources/org/apache/giraph/jython/count-edges-launcher.py
* giraph-core/src/main/java/org/apache/giraph/factories/MessageValueFactory.java
* giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/AbstractHiveToVertex.java
* giraph-hive/src/main/java/org/apache/giraph/hive/types/package-info.java
* giraph-hive/src/test/java/org/apache/giraph/hive/Helpers.java
* giraph-core/src/main/java/org/apache/giraph/jython/JythonComputation.java
* giraph-core/src/main/java/org/apache/giraph/conf/ImmutableClassesGiraphConfiguration.java
* giraph-core/src/main/java/org/apache/giraph/types/ByteToIntWritableWrapper.java
* giraph-hive/src/test/java/org/apache/giraph/hive/jython/TestHiveJythonPrimitives.java
* giraph-core/src/main/java/org/apache/giraph/conf/PerGraphTypeBooleanConfOption.java
* giraph-core/src/test/java/org/apache/giraph/io/TestEdgeInput.java
* giraph-hive/src/main/java/org/apache/giraph/hive/input/edge/TypedHiveToEdge.java
* giraph-core/src/main/java/org/apache/giraph/jython/wrappers/JythonWrapperBase.java
* giraph-core/src/main/java/org/apache/giraph/jython/factories/JythonFactoryBase.java
* giraph-hive/src/test/java/org/apache/giraph/hive/jython/TestJythonLabelInfluence.java
* giraph-core/src/main/java/org/apache/giraph/comm/messages/out_of_core/SequentialFileMessageStore.java
* giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java
* giraph-hive/src/main/java/org/apache/giraph/hive/input/vertex/TypedHiveToVertex.java
* giraph-core/src/main/java/org/apache/giraph/comm/messages/ByteArrayMessagesPerVertexStore.java
* giraph-core/src/main/java/org/apache/giraph/factories/ValueFactory.java
* pom.xml
* giraph-hive/src/test/java/org/apache/giraph/hive/input/HiveEdgeInputTest.java
* giraph-core/src/main/java/org/apache/giraph/types/ShortToLongWritableWrapper.java
* giraph-core/src/main/java/org/apache/giraph/jython/JythonGiraphComputation.java
* giraph-core/src/main/java/org/apache/giraph/comm/messages/InMemoryMessageStoreFactory.java
* giraph-core/src/main/java/org/apache/giraph/utils/ByteArrayVertexIdMessages.java
* giraph-hive/src/main/java/org/apache/giraph/hive/types/HiveValueWriter.java
* giraph-hive/src/main/java/org/apache/giraph/hive/types/HiveValueReader.java
* giraph-hive/src/main/java/org/apache/giraph/hive/primitives/package-info.java
* giraph-core/src/main/java/org/apache/giraph/comm/messages/OneMessagePerVertexStore.java
* giraph-core/src/test/java/org/apache/giraph/jython/TestJythonWritableWrapper.java
* giraph-hive/src/main/java/org/apache/giraph/hive/jython/package-info.java
* giraph-examples/src/test/java/org/apache/giraph/TestBspBasic.java
* giraph-core/src/main/java/org/apache/giraph/jython/factories/package-info.java
* giraph-core/src/main/java/org/apache/giraph/factories/VertexValueFactory.java
* giraph-hive/src/main/java/org/apache/giraph/hive/jython/JythonHiveWriter.java
* giraph-core/src/main/java/org/apache/giraph/graph/GraphType.java
* giraph-core/src/main/java/org/apache/giraph/conf/PerGraphTypeBoolean.java
* giraph-core/src/main/java/org/apache/giraph/jython/factories/JythonMessageValueFactory.java
* giraph-core/src/main/java/org/apache/giraph/types/BooleanToBooleanWritableWrapper.java
* giraph-core/src/main/java/org/apache/giraph/types/ByteToByteWritableWrapper.java
* giraph-core/src/main/java/org/apache/giraph/jython/JythonJob.java
* giraph-core/src/main/java/org/apache/giraph/factories/AbstractMessageValueFactory.java
* giraph-core/src/test/resources/org/apache/giraph/jython/count-edges.py
* giraph-hive/src/main/java/org/apache/giraph/hive/types/TypedVertexIdReader.java
* giraph-core/src/main/java/org/apache/giraph/factories/TestMessageValueFactory.java
* giraph-hive/src/main/java/org/apache/giraph/hive/common/GiraphHiveConstants.java
* giraph-core/src/main/java/org/apache/giraph/types/FloatToDoubleWritableWrapper.java
* giraph-examples/src/test/java/org/apache/giraph/vertex/TestComputationTypes.java
* giraph-hive/src/test/java/org/apache/giraph/hive/jython/TestHiveJythonComplexTypes.java
* giraph-hive/src/main/java/org/apache/giraph/hive/column/package-info.java
* giraph-core/src/main/java/org/apache/giraph/types/IntToLongWritableWrapper.java
* giraph-hive/src/main/java/org/apache/giraph/hive/types/TypedVertexIdWriter.java
* giraph-hive/src/main/java/org/apache/giraph/hive/column/HiveReadableColumn.java
* giraph-core/src/main/java/org/apache/giraph/graph/AbstractComputation.java
* giraph-core/src/main/java/org/apache/giraph/master/MasterCompute.java
* giraph-core/src/test/java/org/apache/giraph/master/TestSwitchClasses.java
* giraph-core/src/main/java/org/apache/giraph/jython/JythonOptions.java
* giraph-hive/src/main/java/org/apache/giraph/hive/types/HiveVertexIdReader.java
* giraph-core/src/main/java/org/apache/giraph/jython/factories/JythonOutgoingMessageValueFactory.java
* giraph-core/src/main/java/org/apache/giraph/jython/factories/JythonVertexIdFactory.java
* giraph-hive/src/main/java/org/apache/giraph/hive/types/TypedValueReader.java
* giraph-core/src/main/java/org/apache/giraph/conf/PerGraphTypeEnumConfOption.java
* giraph-hive/src/main/java/org/apache/giraph/hive/input/edge/AbstractHiveToEdge.java
* giraph-core/src/main/java/org/apache/giraph/scripting/ScriptLoader.java
* giraph-core/src/main/java/org/apache/giraph/types/FloatToFloatWritableWrapper.java
* giraph-core/src/main/java/org/apache/giraph/jython/wrappers/package-info.java
* giraph-hive/src/main/java/org/apache/giraph/hive/values/package-info.java
* giraph-hive/src/main/java/org/apache/giraph/hive/jython/JythonHiveReader.java
* giraph-hive/src/test/java/org/apache/giraph/hive/input/HiveVertexInputTest.java
* giraph-hive/src/main/java/org/apache/giraph/hive/jython/JythonHiveToEdge.java
* giraph-hive/src/main/java/org/apache/giraph/hive/common/LanguageAndType.java
* giraph-hive/src/main/java/org/apache/giraph/hive/values/HiveValueWriter.java
* giraph-core/src/main/java/org/apache/giraph/conf/GiraphConfiguration.java
* giraph-core/src/main/java/org/apache/giraph/utils/ByteArrayOneToAllMessages.java
* giraph-hive/src/main/java/org/apache/giraph/hive/jython/HiveJythonUtils.java
* giraph-hive/src/main/java/org/apache/giraph/hive/common/HiveUtils.java
* giraph-hive/src/main/java/org/apache/giraph/hive/primitives/PrimitiveValueWriter.java
* giraph-hive/src/test/resources/org/apache/giraph/jython/fake-label-propagation-launcher.py
* giraph-hive/src/main/java/org/apache/giraph/hive/output/TypedVertexToHive.java
* giraph-core/src/main/java/org/apache/giraph/factories/ValueFactoryBase.java
* giraph-core/src/main/java/org/apache/giraph/types/WritableWrapper.java
* giraph-core/src/main/java/org/apache/giraph/factories/DefaultVertexValueFactory.java
* giraph-core/src/main/java/org/apache/giraph/graph/Computation.java
* giraph-hive/src/test/java/org/apache/giraph/hive/output/HiveOutputTest.java
* giraph-core/src/main/java/org/apache/giraph/jython/factories/JythonEdgeValueFactory.java
* giraph-core/src/main/java/org/apache/giraph/conf/PerGraphTypeEnum.java
* giraph-core/src/main/java/org/apache/giraph/factories/DefaultVertexIdFactory.java
* giraph-core/src/main/java/org/apache/giraph/graph/BasicComputation.java
* giraph-hive/src/main/java/org/apache/giraph/hive/values/HiveValueReader.java
* giraph-core/src/main/java/org/apache/giraph/types/ByteToLongWritableWrapper.java
* giraph-hcatalog/src/main/java/org/apache/giraph/io/hcatalog/HCatGiraphRunner.java
* giraph-core/src/main/java/org/apache/giraph/comm/messages/MessagesIterable.java
* giraph-core/src/main/java/org/apache/giraph/types/ShortToIntWritableWrapper.java
* giraph-core/pom.xml
* giraph-hive/src/main/java/org/apache/giraph/hive/column/HiveWritableColumn.java
* CHANGELOG
* giraph-core/src/test/java/org/apache/giraph/jython/TestJythonBasic.java
* giraph-core/src/main/java/org/apache/giraph/jython/wrappers/JythonWritableWrapper.java
* giraph-hive/src/main/java/org/apache/giraph/hive/jython/HiveJythonRunner.java
* giraph-core/src/main/java/org/apache/giraph/types/IntToIntWritableWrapper.java
* giraph-core/src/test/java/org/apache/giraph/utils/TestReflectionUtils.java
* giraph-core/src/test/java/org/apache/giraph/jython/TestJython.java
* giraph-core/src/test/java/org/apache/giraph/jython/TestJythonComputation.java
* giraph-hive/src/main/java/org/apache/giraph/hive/jython/JythonColumnWriter.java
* giraph-core/src/main/java/org/apache/giraph/jython/factories/JythonIncomingMessageValueFactory.java
* giraph-core/src/main/java/org/apache/giraph/factories/VertexIdFactory.java
* giraph-hive/src/main/java/org/apache/giraph/hive/jython/JythonColumnReader.java
* giraph-hive/src/main/java/org/apache/giraph/hive/jython/JythonReadableColumn.java
* giraph-hive/src/main/java/org/apache/giraph/hive/jython/JythonHiveIO.java
* giraph-core/src/main/java/org/apache/giraph/utils/ConfigurationUtils.java
* giraph-core/src/main/java/org/apache/giraph/jython/factories/JythonComputationFactory.java

                
> HiveJythonRunner with support for pure Jython value types.
> ----------------------------------------------------------
>
>                 Key: GIRAPH-717
>                 URL: https://issues.apache.org/jira/browse/GIRAPH-717
>             Project: Giraph
>          Issue Type: Bug
>            Reporter: Nitay Joffe
>            Assignee: Nitay Joffe
>
> This adds support for pure Jython jobs. Currently this runner is hooked up to work with
Hive. I'll make it more generic later.
> Running a Jython job is simply:
> HIVE_HOME=<x>
> HADOOP_HOME=<y>
> $HIVE_HOME/bin/hive --service jar <giraph-hive-jar> org.apache.giraph.hive.jython.HiveJythonRunner
jython1.py [jython2.py] ...
> You can pass in any number of scripts. They will be parsed in order and sent to all the
workers using DistributedCache.
> There are examples and tests in the diff. Here is one example:
> launcher: https://gist.github.com/nitay/a62e0a5d369a5e701fa3
> worker: https://gist.github.com/nitay/7834fd2b059527e65a36
> There are a few pieces to a Jython job, I'll go over each part here.
> The HiveJythonRunner will call a function called "prepare(job)" from the Jython scripts.
This is the entry point for configuring your job.
> In this configuration you setup everything, such as your graph types (those IVEMM writables)
and sets up the Hive vertex/edge inputs and output. Each graph type is one of the following:
> 1) A Java type. For example the user can specify simply IntWritable
> 2) A Jython type that implements Writable. In the example above the message value implements
Writable.
> 3) A pure Jython type. The Java code will wrap these objects in a Writable wrapper that
serializes Jython values using Pickle (jython IO framework).
> Your computation must implement JythonComputation. Note that this does not actually implement
Computation, but rather is a separate class so that we can wrap all the types passed in with
a wrapper that implements Writable. The methods are named the same so that the user does not
notice anything.
> For Hive usage - if your value type is a primitive e.g. IntWritable or LongWritable,
then you need not do anything. The Java code will automatically read/write the Hive table
specified and convert between Hive types and the primitive Writable. The vertex_id type in
the example works like this.
> If your value is a custom Jython type, you must create classes which implement JythonHiveReader/JythonHiveWriter
(or JythonHiveIO which is both). These objects read/write Jython types from Hive. There are
wrappers in the Java code which take HiveIO data normally used in giraph-hive and turns them
into Jython types. This means, for example, that getMap() will return a Jython dictionary
instead of a Java Map.
> There is also a PageRankBenchmark (from previous diff) implemented in Jython. Here's
a run for comparison / sanity check:
> PageRankBenchmark with 10 workers, 100M vertices, 10B edges, 10 compute threads
> trunk:
>   https://gist.github.com/nitay/3170fa3b575d4d2e22a9
>   total time: 302466
> with this diff:
>   https://gist.github.com/nitay/a52b6d1d64e50ab9829e
>   total time: 306517
> in jython:
>   https://gist.github.com/nitay/3f2e758b2933c3521727
>   total time: 434730
> So we see that existing things are not affected (is there something else I should test?)
and that Jython has around 40% overhead.
> ReviewBoard: https://reviews.apache.org/r/12543/ (Sorry it's a big one, hard to split
up :/)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message