You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by nz...@apache.org on 2010/07/29 04:41:19 UTC
svn commit: r980297 [15/16] - in /hadoop/hive/trunk: ./
common/src/java/org/apache/hadoop/hive/common/
common/src/java/org/apache/hadoop/hive/conf/ conf/ data/conf/
metastore/src/test/org/apache/hadoop/hive/metastore/
ql/src/java/org/apache/hadoop/hive...
Modified: hadoop/hive/trunk/ql/src/test/results/compiler/plan/sample7.q.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/compiler/plan/sample7.q.xml?rev=980297&r1=980296&r2=980297&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/compiler/plan/sample7.q.xml (original)
+++ hadoop/hive/trunk/ql/src/test/results/compiler/plan/sample7.q.xml Thu Jul 29 02:41:14 2010
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<java version="1.6.0_14" class="java.beans.XMLDecoder">
+<java version="1.6.0_07" class="java.beans.XMLDecoder">
<object id="MapRedTask0" class="org.apache.hadoop.hive.ql.exec.MapRedTask">
<void property="childTasks">
<object class="java.util.ArrayList">
<void method="add">
<object class="org.apache.hadoop.hive.ql.exec.ConditionalTask">
<void property="id">
- <string>Stage-5</string>
+ <string>Stage-6</string>
</void>
<void property="listTasks">
<object id="ArrayList0" class="java.util.ArrayList">
@@ -17,7 +17,7 @@
<void method="add">
<object id="MoveTask1" class="org.apache.hadoop.hive.ql.exec.MoveTask">
<void property="id">
- <string>Stage-1</string>
+ <string>Stage-2</string>
</void>
<void property="parentTasks">
<object class="java.util.ArrayList">
@@ -34,14 +34,14 @@
</object>
</void>
<void property="id">
- <string>Stage-3</string>
+ <string>Stage-4</string>
</void>
<void property="work">
<object id="MapredWork0" class="org.apache.hadoop.hive.ql.plan.MapredWork">
<void property="aliasToWork">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/scratchdir/hive_2010-04-08_11-28-54_650_3675269060918433067/10002</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-33_090_5115088819516774063/-ext-10002</string>
<object id="TableScanOperator0" class="org.apache.hadoop.hive.ql.exec.TableScanOperator">
<void property="childOperators">
<object class="java.util.ArrayList">
@@ -286,10 +286,10 @@
<void property="pathToAliases">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/scratchdir/hive_2010-04-08_11-28-54_650_3675269060918433067/10002</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-33_090_5115088819516774063/-ext-10002</string>
<object class="java.util.ArrayList">
<void method="add">
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/scratchdir/hive_2010-04-08_11-28-54_650_3675269060918433067/10002</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-33_090_5115088819516774063/-ext-10002</string>
</void>
</object>
</void>
@@ -298,10 +298,10 @@
<void property="pathToPartitionInfo">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/scratchdir/hive_2010-04-08_11-28-54_650_3675269060918433067/10002</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-33_090_5115088819516774063/-ext-10002</string>
<object class="org.apache.hadoop.hive.ql.plan.PartitionDesc">
<void property="baseFileName">
- <string>10002</string>
+ <string>-ext-10002</string>
</void>
<void property="deserializerClass">
<class>org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe</class>
@@ -352,11 +352,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/test/data/warehouse/dest1</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/dest1</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1270751334</string>
+ <string>1280088512</string>
</void>
</object>
</void>
@@ -395,7 +395,7 @@
<void property="conf">
<object class="org.apache.hadoop.hive.ql.plan.FileSinkDesc">
<void property="dirName">
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/scratchdir/hive_2010-04-08_11-28-54_650_3675269060918433067/10000</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-33_090_5115088819516774063/-ext-10000</string>
</void>
<void property="numFiles">
<int>1</int>
@@ -447,7 +447,7 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/test/data/warehouse/dest1</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/dest1</string>
</void>
<void method="put">
<string>file.outputformat</string>
@@ -455,7 +455,7 @@
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1270751334</string>
+ <string>1280088512</string>
</void>
</object>
</void>
@@ -596,13 +596,13 @@
<boolean>true</boolean>
</void>
<void property="sourceDir">
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/scratchdir/hive_2010-04-08_11-28-54_650_3675269060918433067/10000</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-33_090_5115088819516774063/-ext-10000</string>
</void>
<void property="table">
<object idref="TableDesc2"/>
</void>
<void property="tmpDir">
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/scratchdir/hive_2010-04-08_11-28-54_650_3675269060918433067/10001</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-33_090_5115088819516774063/-ext-10001</string>
</void>
</object>
</void>
@@ -613,7 +613,7 @@
</object>
</void>
<void property="id">
- <string>Stage-4</string>
+ <string>Stage-5</string>
</void>
<void property="work">
<object id="MoveWork0" class="org.apache.hadoop.hive.ql.plan.MoveWork">
@@ -623,10 +623,10 @@
<boolean>true</boolean>
</void>
<void property="sourceDir">
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/scratchdir/hive_2010-04-08_11-28-54_650_3675269060918433067/10002</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-33_090_5115088819516774063/-ext-10002</string>
</void>
<void property="targetDir">
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/scratchdir/hive_2010-04-08_11-28-54_650_3675269060918433067/10000</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-33_090_5115088819516774063/-ext-10000</string>
</void>
</object>
</void>
@@ -652,7 +652,7 @@
<void property="resolverCtx">
<object class="org.apache.hadoop.hive.ql.plan.ConditionalResolverMergeFiles$ConditionalResolverMergeFilesCtx">
<void property="dir">
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/scratchdir/hive_2010-04-08_11-28-54_650_3675269060918433067/10002</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-33_090_5115088819516774063/-ext-10002</string>
</void>
<void property="listTasks">
<object idref="ArrayList0"/>
@@ -678,7 +678,7 @@
</object>
</void>
<void property="id">
- <string>Stage-2</string>
+ <string>Stage-3</string>
</void>
<void property="work">
<object class="org.apache.hadoop.hive.ql.plan.MapredWork">
@@ -742,11 +742,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/test/data/warehouse/srcbucket</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/srcbucket</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1270751332</string>
+ <string>1280088507</string>
</void>
</object>
</void>
@@ -806,7 +806,7 @@
<int>1</int>
</void>
<void property="dirName">
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/scratchdir/hive_2010-04-08_11-28-54_650_3675269060918433067/10002</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-33_090_5115088819516774063/-ext-10002</string>
</void>
<void property="numFiles">
<int>1</int>
@@ -1563,7 +1563,7 @@
<void property="pathToAliases">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/test/data/warehouse/srcbucket/srcbucket0.txt</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/srcbucket/srcbucket0.txt</string>
<object class="java.util.ArrayList">
<void method="add">
<string>s</string>
@@ -1575,7 +1575,7 @@
<void property="pathToPartitionInfo">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/test/data/warehouse/srcbucket/srcbucket0.txt</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/srcbucket/srcbucket0.txt</string>
<object class="org.apache.hadoop.hive.ql.plan.PartitionDesc">
<void property="baseFileName">
<string>srcbucket0.txt</string>
@@ -1636,11 +1636,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/data/users/nzhang/work/876/apache-hive/build/ql/test/data/warehouse/srcbucket</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/srcbucket</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1270751332</string>
+ <string>1280088507</string>
</void>
</object>
</void>
Modified: hadoop/hive/trunk/ql/src/test/results/compiler/plan/subq.q.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/compiler/plan/subq.q.xml?rev=980297&r1=980296&r2=980297&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/compiler/plan/subq.q.xml (original)
+++ hadoop/hive/trunk/ql/src/test/results/compiler/plan/subq.q.xml Thu Jul 29 02:41:14 2010
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<java version="1.6.0_17" class="java.beans.XMLDecoder">
+<java version="1.6.0_07" class="java.beans.XMLDecoder">
<object id="MapRedTask0" class="org.apache.hadoop.hive.ql.exec.MapRedTask">
<void property="childTasks">
<object class="java.util.ArrayList">
<void method="add">
<object class="org.apache.hadoop.hive.ql.exec.ConditionalTask">
<void property="id">
- <string>Stage-5</string>
+ <string>Stage-6</string>
</void>
<void property="listTasks">
<object id="ArrayList0" class="java.util.ArrayList">
@@ -17,7 +17,7 @@
<void method="add">
<object id="MoveTask1" class="org.apache.hadoop.hive.ql.exec.MoveTask">
<void property="id">
- <string>Stage-1</string>
+ <string>Stage-2</string>
</void>
<void property="parentTasks">
<object class="java.util.ArrayList">
@@ -34,14 +34,14 @@
</object>
</void>
<void property="id">
- <string>Stage-3</string>
+ <string>Stage-4</string>
</void>
<void property="work">
<object id="MapredWork0" class="org.apache.hadoop.hive.ql.plan.MapredWork">
<void property="aliasToWork">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-37-50_915_3283756193597972413/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-44_132_3881904371081912513/-ext-10001</string>
<object id="TableScanOperator0" class="org.apache.hadoop.hive.ql.exec.TableScanOperator">
<void property="childOperators">
<object class="java.util.ArrayList">
@@ -286,10 +286,10 @@
<void property="pathToAliases">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-37-50_915_3283756193597972413/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-44_132_3881904371081912513/-ext-10001</string>
<object class="java.util.ArrayList">
<void method="add">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-37-50_915_3283756193597972413/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-44_132_3881904371081912513/-ext-10001</string>
</void>
</object>
</void>
@@ -298,10 +298,10 @@
<void property="pathToPartitionInfo">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-37-50_915_3283756193597972413/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-44_132_3881904371081912513/-ext-10001</string>
<object class="org.apache.hadoop.hive.ql.plan.PartitionDesc">
<void property="baseFileName">
- <string>10001</string>
+ <string>-ext-10001</string>
</void>
<void property="deserializerClass">
<class>org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe</class>
@@ -357,7 +357,7 @@
<void property="conf">
<object class="org.apache.hadoop.hive.ql.plan.FileSinkDesc">
<void property="dirName">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-37-50_915_3283756193597972413/10000</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-44_132_3881904371081912513/-ext-10000</string>
</void>
<void property="numFiles">
<int>1</int>
@@ -522,7 +522,7 @@
<boolean>true</boolean>
</void>
<void property="sourceDir">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-37-50_915_3283756193597972413/10000</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-44_132_3881904371081912513/-ext-10000</string>
</void>
<void property="targetDir">
<string>../build/ql/test/data/warehouse/union.out</string>
@@ -536,7 +536,7 @@
</object>
</void>
<void property="id">
- <string>Stage-4</string>
+ <string>Stage-5</string>
</void>
<void property="work">
<object id="MoveWork0" class="org.apache.hadoop.hive.ql.plan.MoveWork">
@@ -546,10 +546,10 @@
<boolean>true</boolean>
</void>
<void property="sourceDir">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-37-50_915_3283756193597972413/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-44_132_3881904371081912513/-ext-10001</string>
</void>
<void property="targetDir">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-37-50_915_3283756193597972413/10000</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-44_132_3881904371081912513/-ext-10000</string>
</void>
</object>
</void>
@@ -575,7 +575,7 @@
<void property="resolverCtx">
<object class="org.apache.hadoop.hive.ql.plan.ConditionalResolverMergeFiles$ConditionalResolverMergeFilesCtx">
<void property="dir">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-37-50_915_3283756193597972413/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-44_132_3881904371081912513/-ext-10001</string>
</void>
<void property="listTasks">
<object idref="ArrayList0"/>
@@ -601,7 +601,7 @@
</object>
</void>
<void property="id">
- <string>Stage-2</string>
+ <string>Stage-3</string>
</void>
<void property="work">
<object class="org.apache.hadoop.hive.ql.plan.MapredWork">
@@ -661,11 +661,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1268858270</string>
+ <string>1280088521</string>
</void>
</object>
</void>
@@ -725,7 +725,7 @@
<int>1</int>
</void>
<void property="dirName">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-37-50_915_3283756193597972413/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-08-44_132_3881904371081912513/-ext-10001</string>
</void>
<void property="numFiles">
<int>1</int>
@@ -1273,7 +1273,7 @@
<void property="pathToAliases">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
<object class="java.util.ArrayList">
<void method="add">
<string>unioninput:src</string>
@@ -1285,7 +1285,7 @@
<void property="pathToPartitionInfo">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
<object class="org.apache.hadoop.hive.ql.plan.PartitionDesc">
<void property="baseFileName">
<string>src</string>
@@ -1342,11 +1342,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1268858270</string>
+ <string>1280088521</string>
</void>
</object>
</void>
Modified: hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf1.q.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf1.q.xml?rev=980297&r1=980296&r2=980297&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf1.q.xml (original)
+++ hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf1.q.xml Thu Jul 29 02:41:14 2010
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<java version="1.6.0_17" class="java.beans.XMLDecoder">
+<java version="1.6.0_07" class="java.beans.XMLDecoder">
<object class="org.apache.hadoop.hive.ql.exec.MapRedTask">
<void property="id">
- <string>Stage-2</string>
+ <string>Stage-3</string>
</void>
<void property="work">
<object class="org.apache.hadoop.hive.ql.plan.MapredWork">
@@ -62,11 +62,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1268858272</string>
+ <string>1280088532</string>
</void>
</object>
</void>
@@ -119,7 +119,7 @@
<void property="conf">
<object class="org.apache.hadoop.hive.ql.plan.FileSinkDesc">
<void property="dirName">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-37-53_218_968039224977034805/10001</string>
+ <string>file:/tmp/jssarma/hive_2010-07-25_13-08-55_192_2194975541337978080/-ext-10001</string>
</void>
<void property="numFiles">
<int>1</int>
@@ -1796,7 +1796,7 @@
<void property="pathToAliases">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
<object class="java.util.ArrayList">
<void method="add">
<string>src</string>
@@ -1808,7 +1808,7 @@
<void property="pathToPartitionInfo">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
<object class="org.apache.hadoop.hive.ql.plan.PartitionDesc">
<void property="baseFileName">
<string>src</string>
@@ -1865,11 +1865,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1268858272</string>
+ <string>1280088532</string>
</void>
</object>
</void>
Modified: hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf4.q.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf4.q.xml?rev=980297&r1=980296&r2=980297&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf4.q.xml (original)
+++ hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf4.q.xml Thu Jul 29 02:41:14 2010
@@ -2,7 +2,7 @@
<java version="1.6.0_07" class="java.beans.XMLDecoder">
<object class="org.apache.hadoop.hive.ql.exec.MapRedTask">
<void property="id">
- <string>Stage-2</string>
+ <string>Stage-3</string>
</void>
<void property="work">
<object class="org.apache.hadoop.hive.ql.plan.MapredWork">
@@ -62,11 +62,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/dest1</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/dest1</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1266455973</string>
+ <string>1280088553</string>
</void>
</object>
</void>
@@ -111,7 +111,7 @@
<void property="conf">
<object class="org.apache.hadoop.hive.ql.plan.FileSinkDesc">
<void property="dirName">
- <string>file:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-02-17_17-19-34_086_8221720525117767647/10001</string>
+ <string>file:/tmp/jssarma/hive_2010-07-25_13-09-13_877_6910137373121445004/-ext-10001</string>
</void>
<void property="numFiles">
<int>1</int>
@@ -1612,7 +1612,7 @@
<void property="pathToAliases">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/dest1</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/dest1</string>
<object class="java.util.ArrayList">
<void method="add">
<string>dest1</string>
@@ -1624,7 +1624,7 @@
<void property="pathToPartitionInfo">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/dest1</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/dest1</string>
<object class="org.apache.hadoop.hive.ql.plan.PartitionDesc">
<void property="baseFileName">
<string>dest1</string>
@@ -1681,11 +1681,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/dest1</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/dest1</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1266455973</string>
+ <string>1280088553</string>
</void>
</object>
</void>
Modified: hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf6.q.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf6.q.xml?rev=980297&r1=980296&r2=980297&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf6.q.xml (original)
+++ hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf6.q.xml Thu Jul 29 02:41:14 2010
@@ -2,7 +2,7 @@
<java version="1.6.0_07" class="java.beans.XMLDecoder">
<object class="org.apache.hadoop.hive.ql.exec.MapRedTask">
<void property="id">
- <string>Stage-2</string>
+ <string>Stage-3</string>
</void>
<void property="work">
<object class="org.apache.hadoop.hive.ql.plan.MapredWork">
@@ -62,11 +62,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1266455976</string>
+ <string>1280088562</string>
</void>
</object>
</void>
@@ -111,7 +111,7 @@
<void property="conf">
<object class="org.apache.hadoop.hive.ql.plan.FileSinkDesc">
<void property="dirName">
- <string>file:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-02-17_17-19-37_256_6829332770907119684/10001</string>
+ <string>file:/tmp/jssarma/hive_2010-07-25_13-09-24_874_4624432500031555414/-ext-10001</string>
</void>
<void property="numFiles">
<int>1</int>
@@ -463,7 +463,7 @@
<void property="pathToAliases">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
<object class="java.util.ArrayList">
<void method="add">
<string>src</string>
@@ -475,7 +475,7 @@
<void property="pathToPartitionInfo">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
<object class="org.apache.hadoop.hive.ql.plan.PartitionDesc">
<void property="baseFileName">
<string>src</string>
@@ -532,11 +532,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1266455976</string>
+ <string>1280088562</string>
</void>
</object>
</void>
Modified: hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf_case.q.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf_case.q.xml?rev=980297&r1=980296&r2=980297&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf_case.q.xml (original)
+++ hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf_case.q.xml Thu Jul 29 02:41:14 2010
@@ -2,7 +2,7 @@
<java version="1.6.0_07" class="java.beans.XMLDecoder">
<object class="org.apache.hadoop.hive.ql.exec.MapRedTask">
<void property="id">
- <string>Stage-2</string>
+ <string>Stage-3</string>
</void>
<void property="work">
<object class="org.apache.hadoop.hive.ql.plan.MapredWork">
@@ -62,11 +62,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1266455979</string>
+ <string>1280088573</string>
</void>
</object>
</void>
@@ -115,7 +115,7 @@
<void property="conf">
<object class="org.apache.hadoop.hive.ql.plan.FileSinkDesc">
<void property="dirName">
- <string>file:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-02-17_17-19-40_240_570119255178016112/10001</string>
+ <string>file:/tmp/jssarma/hive_2010-07-25_13-09-35_681_1344016804653403382/-ext-10001</string>
</void>
<void property="numFiles">
<int>1</int>
@@ -560,7 +560,7 @@
<void property="pathToAliases">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
<object class="java.util.ArrayList">
<void method="add">
<string>src</string>
@@ -572,7 +572,7 @@
<void property="pathToPartitionInfo">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
<object class="org.apache.hadoop.hive.ql.plan.PartitionDesc">
<void property="baseFileName">
<string>src</string>
@@ -629,11 +629,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1266455979</string>
+ <string>1280088573</string>
</void>
</object>
</void>
Modified: hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf_when.q.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf_when.q.xml?rev=980297&r1=980296&r2=980297&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf_when.q.xml (original)
+++ hadoop/hive/trunk/ql/src/test/results/compiler/plan/udf_when.q.xml Thu Jul 29 02:41:14 2010
@@ -2,7 +2,7 @@
<java version="1.6.0_07" class="java.beans.XMLDecoder">
<object class="org.apache.hadoop.hive.ql.exec.MapRedTask">
<void property="id">
- <string>Stage-2</string>
+ <string>Stage-3</string>
</void>
<void property="work">
<object class="org.apache.hadoop.hive.ql.plan.MapredWork">
@@ -62,11 +62,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1266455982</string>
+ <string>1280088583</string>
</void>
</object>
</void>
@@ -115,7 +115,7 @@
<void property="conf">
<object class="org.apache.hadoop.hive.ql.plan.FileSinkDesc">
<void property="dirName">
- <string>file:/data/users/njain/hive1/hive1/build/ql/scratchdir/hive_2010-02-17_17-19-43_206_8676665430536340334/10001</string>
+ <string>file:/tmp/jssarma/hive_2010-07-25_13-09-46_492_8271745675595132779/-ext-10001</string>
</void>
<void property="numFiles">
<int>1</int>
@@ -680,7 +680,7 @@
<void property="pathToAliases">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
<object class="java.util.ArrayList">
<void method="add">
<string>src</string>
@@ -692,7 +692,7 @@
<void property="pathToPartitionInfo">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
<object class="org.apache.hadoop.hive.ql.plan.PartitionDesc">
<void property="baseFileName">
<string>src</string>
@@ -749,11 +749,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/data/users/njain/hive1/hive1/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1266455982</string>
+ <string>1280088583</string>
</void>
</object>
</void>
Modified: hadoop/hive/trunk/ql/src/test/results/compiler/plan/union.q.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/ql/src/test/results/compiler/plan/union.q.xml?rev=980297&r1=980296&r2=980297&view=diff
==============================================================================
--- hadoop/hive/trunk/ql/src/test/results/compiler/plan/union.q.xml (original)
+++ hadoop/hive/trunk/ql/src/test/results/compiler/plan/union.q.xml Thu Jul 29 02:41:14 2010
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
-<java version="1.6.0_17" class="java.beans.XMLDecoder">
+<java version="1.6.0_07" class="java.beans.XMLDecoder">
<object id="MapRedTask0" class="org.apache.hadoop.hive.ql.exec.MapRedTask">
<void property="childTasks">
<object class="java.util.ArrayList">
<void method="add">
<object class="org.apache.hadoop.hive.ql.exec.ConditionalTask">
<void property="id">
- <string>Stage-5</string>
+ <string>Stage-6</string>
</void>
<void property="listTasks">
<object id="ArrayList0" class="java.util.ArrayList">
@@ -17,7 +17,7 @@
<void method="add">
<object id="MoveTask1" class="org.apache.hadoop.hive.ql.exec.MoveTask">
<void property="id">
- <string>Stage-1</string>
+ <string>Stage-2</string>
</void>
<void property="parentTasks">
<object class="java.util.ArrayList">
@@ -34,14 +34,14 @@
</object>
</void>
<void property="id">
- <string>Stage-3</string>
+ <string>Stage-4</string>
</void>
<void property="work">
<object id="MapredWork0" class="org.apache.hadoop.hive.ql.plan.MapredWork">
<void property="aliasToWork">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-38-03_630_5963252343479840058/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-09-57_296_5421351551755182607/-ext-10001</string>
<object id="TableScanOperator0" class="org.apache.hadoop.hive.ql.exec.TableScanOperator">
<void property="childOperators">
<object class="java.util.ArrayList">
@@ -286,10 +286,10 @@
<void property="pathToAliases">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-38-03_630_5963252343479840058/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-09-57_296_5421351551755182607/-ext-10001</string>
<object class="java.util.ArrayList">
<void method="add">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-38-03_630_5963252343479840058/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-09-57_296_5421351551755182607/-ext-10001</string>
</void>
</object>
</void>
@@ -298,10 +298,10 @@
<void property="pathToPartitionInfo">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-38-03_630_5963252343479840058/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-09-57_296_5421351551755182607/-ext-10001</string>
<object class="org.apache.hadoop.hive.ql.plan.PartitionDesc">
<void property="baseFileName">
- <string>10001</string>
+ <string>-ext-10001</string>
</void>
<void property="deserializerClass">
<class>org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe</class>
@@ -357,7 +357,7 @@
<void property="conf">
<object class="org.apache.hadoop.hive.ql.plan.FileSinkDesc">
<void property="dirName">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-38-03_630_5963252343479840058/10000</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-09-57_296_5421351551755182607/-ext-10000</string>
</void>
<void property="numFiles">
<int>1</int>
@@ -522,7 +522,7 @@
<boolean>true</boolean>
</void>
<void property="sourceDir">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-38-03_630_5963252343479840058/10000</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-09-57_296_5421351551755182607/-ext-10000</string>
</void>
<void property="targetDir">
<string>../build/ql/test/data/warehouse/union.out</string>
@@ -536,7 +536,7 @@
</object>
</void>
<void property="id">
- <string>Stage-4</string>
+ <string>Stage-5</string>
</void>
<void property="work">
<object id="MoveWork0" class="org.apache.hadoop.hive.ql.plan.MoveWork">
@@ -546,10 +546,10 @@
<boolean>true</boolean>
</void>
<void property="sourceDir">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-38-03_630_5963252343479840058/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-09-57_296_5421351551755182607/-ext-10001</string>
</void>
<void property="targetDir">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-38-03_630_5963252343479840058/10000</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-09-57_296_5421351551755182607/-ext-10000</string>
</void>
</object>
</void>
@@ -575,7 +575,7 @@
<void property="resolverCtx">
<object class="org.apache.hadoop.hive.ql.plan.ConditionalResolverMergeFiles$ConditionalResolverMergeFilesCtx">
<void property="dir">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-38-03_630_5963252343479840058/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-09-57_296_5421351551755182607/-ext-10001</string>
</void>
<void property="listTasks">
<object idref="ArrayList0"/>
@@ -601,7 +601,7 @@
</object>
</void>
<void property="id">
- <string>Stage-2</string>
+ <string>Stage-3</string>
</void>
<void property="work">
<object class="org.apache.hadoop.hive.ql.plan.MapredWork">
@@ -661,11 +661,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1268858283</string>
+ <string>1280088594</string>
</void>
</object>
</void>
@@ -748,11 +748,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1268858283</string>
+ <string>1280088594</string>
</void>
</object>
</void>
@@ -816,7 +816,7 @@
<int>1</int>
</void>
<void property="dirName">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/scratchdir/hive_2010-03-17_13-38-03_630_5963252343479840058/10001</string>
+ <string>file:/data/users/jssarma/hive_trunk/build/ql/scratchdir/hive_2010-07-25_13-09-57_296_5421351551755182607/-ext-10001</string>
</void>
<void property="numFiles">
<int>1</int>
@@ -1799,7 +1799,7 @@
<void property="pathToAliases">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
<object class="java.util.ArrayList">
<void method="add">
<string>null-subquery1:unioninput-subquery1:src</string>
@@ -1814,7 +1814,7 @@
<void property="pathToPartitionInfo">
<object class="java.util.LinkedHashMap">
<void method="put">
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
<object class="org.apache.hadoop.hive.ql.plan.PartitionDesc">
<void property="baseFileName">
<string>src</string>
@@ -1871,11 +1871,11 @@
</void>
<void method="put">
<string>location</string>
- <string>file:/Users/heyongqiang/Documents/workspace/Hive-Test/build/ql/test/data/warehouse/src</string>
+ <string>pfile:/data/users/jssarma/hive_trunk/build/ql/test/data/warehouse/src</string>
</void>
<void method="put">
<string>transient_lastDdlTime</string>
- <string>1268858283</string>
+ <string>1280088594</string>
</void>
</object>
</void>
Modified: hadoop/hive/trunk/shims/build.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/shims/build.xml?rev=980297&r1=980296&r2=980297&view=diff
==============================================================================
--- hadoop/hive/trunk/shims/build.xml (original)
+++ hadoop/hive/trunk/shims/build.xml Thu Jul 29 02:41:14 2010
@@ -42,6 +42,7 @@ to call at top-level: ant deploy-contrib
<javac
encoding="${build.encoding}"
includes="**/*.java"
+ excludes="**/Proxy*.java"
destdir="${build.classes}"
debug="${javac.debug}"
deprecation="${javac.deprecation}">
@@ -65,6 +66,17 @@ to call at top-level: ant deploy-contrib
<antcall target="build_shims" inheritRefs="false" inheritAll="false">
<param name="hadoop.version.ant-internal" value="0.20.0" />
</antcall>
+ <getversionpref property="hadoop.version.ant-internal.prefix" input="${hadoop.version}" />
+ <javac
+ encoding="${build.encoding}"
+ includes="**/Proxy*.java"
+ destdir="${build.classes}"
+ debug="${javac.debug}"
+ deprecation="${javac.deprecation}">
+ <compilerarg line="${javac.args} ${javac.args.warnings}" />
+ <classpath refid="classpath"/>
+ <src path="${basedir}/src/${hadoop.version.ant-internal.prefix}/java" />
+ </javac>
</target>
Added: hadoop/hive/trunk/shims/src/0.17/java/org/apache/hadoop/fs/ProxyFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/shims/src/0.17/java/org/apache/hadoop/fs/ProxyFileSystem.java?rev=980297&view=auto
==============================================================================
--- hadoop/hive/trunk/shims/src/0.17/java/org/apache/hadoop/fs/ProxyFileSystem.java (added)
+++ hadoop/hive/trunk/shims/src/0.17/java/org/apache/hadoop/fs/ProxyFileSystem.java Thu Jul 29 02:41:14 2010
@@ -0,0 +1,243 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.fs;
+
+import java.io.*;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.permission.FsPermission;
+import org.apache.hadoop.util.Progressable;
+
+/****************************************************************
+ * A FileSystem that can serve a given scheme/authority using some
+ * other file system. In that sense, it serves as a proxy for the
+ * real/underlying file system
+ *****************************************************************/
+
+public class ProxyFileSystem extends FilterFileSystem {
+
+ protected String myScheme;
+ protected String myAuthority;
+ protected URI myUri;
+
+ protected String realScheme;
+ protected String realAuthority;
+ protected URI realUri;
+
+
+
+ private Path swizzleParamPath(Path p) {
+ return new Path (realScheme, realAuthority, p.toUri().getPath());
+ }
+
+ private Path swizzleReturnPath(Path p) {
+ return new Path (myScheme, myAuthority, p.toUri().getPath());
+ }
+
+ private FileStatus swizzleFileStatus(FileStatus orig, boolean isParam) {
+ FileStatus ret =
+ new FileStatus(orig.getLen(), orig.isDir(), orig.getReplication(),
+ orig.getBlockSize(), orig.getModificationTime(),
+ orig.getPermission(),
+ orig.getOwner(), orig.getGroup(),
+ isParam ? swizzleParamPath(orig.getPath()) :
+ swizzleReturnPath(orig.getPath()));
+ return ret;
+ }
+
+ public ProxyFileSystem(FileSystem fs) {
+ super(fs);
+ throw new RuntimeException ("Unsupported constructor");
+ }
+
+ /**
+ * Create a proxy file system for fs.
+ *
+ * @param fs FileSystem to create proxy for
+ * @param myUri URI to use as proxy. Only the scheme and authority from
+ * this are used right now
+ */
+ public ProxyFileSystem(FileSystem fs, URI myUri) {
+ super(fs);
+
+ URI realUri = fs.getUri();
+ this.realScheme = realUri.getScheme();
+ this.realAuthority=realUri.getAuthority();
+ this.realUri = realUri;
+
+ this.myScheme = myUri.getScheme();
+ this.myAuthority=myUri.getAuthority();
+ this.myUri = myUri;
+ }
+
+ public void initialize(URI name, Configuration conf) throws IOException {
+ try {
+ URI realUri = new URI (realScheme, realAuthority,
+ name.getPath(), name.getQuery(), name.getFragment());
+ super.initialize(realUri, conf);
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public URI getUri() {
+ return myUri;
+ }
+
+ public String getName() {
+ return getUri().toString();
+ }
+
+ public Path makeQualified(Path path) {
+ return swizzleReturnPath(super.makeQualified(swizzleParamPath(path)));
+ }
+
+
+ protected void checkPath(Path path) {
+ super.checkPath(swizzleParamPath(path));
+ }
+
+ public BlockLocation[] getFileBlockLocations(Path p, long start,
+ long len) throws IOException {
+ return super.getFileBlockLocations(swizzleParamPath(p),
+ start, len);
+ }
+
+ public FSDataInputStream open(Path f, int bufferSize) throws IOException {
+ return super.open(swizzleParamPath(f), bufferSize);
+ }
+
+ public FSDataOutputStream create(Path f, FsPermission permission,
+ boolean overwrite, int bufferSize, short replication, long blockSize,
+ Progressable progress) throws IOException {
+ return super.create(swizzleParamPath(f), permission,
+ overwrite, bufferSize, replication, blockSize, progress);
+ }
+
+ public boolean setReplication(Path src, short replication) throws IOException {
+ return super.setReplication(swizzleParamPath(src), replication);
+ }
+
+ public boolean rename(Path src, Path dst) throws IOException {
+ return super.rename(swizzleParamPath(src), swizzleParamPath(dst));
+ }
+
+ public boolean delete(Path f, boolean recursive) throws IOException {
+ return super.delete(swizzleParamPath(f), recursive);
+ }
+
+ public FileStatus[] listStatus(Path f) throws IOException {
+ FileStatus[] orig = super.listStatus(swizzleParamPath(f));
+ FileStatus[] ret = new FileStatus [orig.length];
+ for (int i=0; i<orig.length; i++) {
+ ret[i] = swizzleFileStatus(orig[i], false);
+ }
+ return ret;
+ }
+
+ public Path getHomeDirectory() {
+ return swizzleReturnPath(super.getHomeDirectory());
+ }
+
+ public void setWorkingDirectory(Path newDir) {
+ super.setWorkingDirectory(swizzleParamPath(newDir));
+ }
+
+ public Path getWorkingDirectory() {
+ return swizzleReturnPath(super.getWorkingDirectory());
+ }
+
+ public boolean mkdirs(Path f, FsPermission permission) throws IOException {
+ return super.mkdirs(swizzleParamPath(f), permission);
+ }
+
+ public void copyFromLocalFile(boolean delSrc, Path src, Path dst)
+ throws IOException {
+ super.copyFromLocalFile(delSrc, swizzleParamPath(src), swizzleParamPath(dst));
+ }
+
+ public void copyFromLocalFile(boolean delSrc, boolean overwrite,
+ Path[] srcs, Path dst)
+ throws IOException {
+ super.copyFromLocalFile(delSrc, overwrite, srcs, swizzleParamPath(dst));
+ }
+
+ public void copyFromLocalFile(boolean delSrc, boolean overwrite,
+ Path src, Path dst)
+ throws IOException {
+ super.copyFromLocalFile(delSrc, overwrite, src, swizzleParamPath(dst));
+ }
+
+ public void copyToLocalFile(boolean delSrc, Path src, Path dst)
+ throws IOException {
+ super.copyToLocalFile(delSrc, swizzleParamPath(src), dst);
+ }
+
+ public Path startLocalOutput(Path fsOutputFile, Path tmpLocalFile)
+ throws IOException {
+ return super.startLocalOutput(swizzleParamPath(fsOutputFile), tmpLocalFile);
+ }
+
+ public void completeLocalOutput(Path fsOutputFile, Path tmpLocalFile)
+ throws IOException {
+ super.completeLocalOutput(swizzleParamPath(fsOutputFile), tmpLocalFile);
+ }
+
+ public long getUsed() throws IOException{
+ return super.getUsed();
+ }
+
+ public long getDefaultBlockSize() {
+ return super.getDefaultBlockSize();
+ }
+
+ public short getDefaultReplication() {
+ return super.getDefaultReplication();
+ }
+
+ public ContentSummary getContentSummary(Path f) throws IOException {
+ return super.getContentSummary(swizzleParamPath(f));
+ }
+
+ public FileStatus getFileStatus(Path f) throws IOException {
+ return swizzleFileStatus(super.getFileStatus(swizzleParamPath(f)), false);
+ }
+
+ public Configuration getConf() {
+ return super.getConf();
+ }
+
+ public void close() throws IOException {
+ super.close();
+ super.close();
+ }
+
+ public void setOwner(Path p, String username, String groupname
+ ) throws IOException {
+ super.setOwner(swizzleParamPath(p), username, groupname);
+ }
+
+ public void setPermission(Path p, FsPermission permission
+ ) throws IOException {
+ super.setPermission(swizzleParamPath(p), permission);
+ }
+}
+
Added: hadoop/hive/trunk/shims/src/0.17/java/org/apache/hadoop/fs/ProxyLocalFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/shims/src/0.17/java/org/apache/hadoop/fs/ProxyLocalFileSystem.java?rev=980297&view=auto
==============================================================================
--- hadoop/hive/trunk/shims/src/0.17/java/org/apache/hadoop/fs/ProxyLocalFileSystem.java (added)
+++ hadoop/hive/trunk/shims/src/0.17/java/org/apache/hadoop/fs/ProxyLocalFileSystem.java Thu Jul 29 02:41:14 2010
@@ -0,0 +1,65 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.fs;
+
+import java.io.*;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.permission.FsPermission;
+import org.apache.hadoop.util.Progressable;
+
+/****************************************************************
+ * A Proxy for LocalFileSystem
+ *
+ * Serves uri's corresponding to 'pfile:///' namespace with using
+ * a LocalFileSystem
+ *****************************************************************/
+
+public class ProxyLocalFileSystem extends FilterFileSystem {
+
+ protected LocalFileSystem localFs;
+
+ public ProxyLocalFileSystem() {
+ // this is a dummy call to get around the fact that FFS has
+ // no zero-arg constructor
+ super(null);
+ localFs = new LocalFileSystem();
+ }
+
+ public ProxyLocalFileSystem(FileSystem fs) {
+ super(fs);
+ throw new RuntimeException ("Unsupported Constructor");
+ }
+
+ @Override
+ public void initialize(URI name, Configuration conf) throws IOException {
+ // create a proxy for the local filesystem
+ // the scheme/authority serving as the proxy is derived
+ // from the supplied URI
+
+ String scheme = name.getScheme();
+ String authority = name.getAuthority() != null ? name.getAuthority() : "";
+ String proxyUriString = name + "://" + authority + "/";
+ fs = new ProxyFileSystem(localFs, URI.create(proxyUriString));
+
+ fs.initialize(name, conf);
+ }
+}
Added: hadoop/hive/trunk/shims/src/0.18/java/org/apache/hadoop/fs/ProxyFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/shims/src/0.18/java/org/apache/hadoop/fs/ProxyFileSystem.java?rev=980297&view=auto
==============================================================================
--- hadoop/hive/trunk/shims/src/0.18/java/org/apache/hadoop/fs/ProxyFileSystem.java (added)
+++ hadoop/hive/trunk/shims/src/0.18/java/org/apache/hadoop/fs/ProxyFileSystem.java Thu Jul 29 02:41:14 2010
@@ -0,0 +1,255 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.fs;
+
+import java.io.*;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.permission.FsPermission;
+import org.apache.hadoop.util.Progressable;
+
+/****************************************************************
+ * A FileSystem that can serve a given scheme/authority using some
+ * other file system. In that sense, it serves as a proxy for the
+ * real/underlying file system
+ *****************************************************************/
+
+public class ProxyFileSystem extends FilterFileSystem {
+
+ protected String myScheme;
+ protected String myAuthority;
+ protected URI myUri;
+
+ protected String realScheme;
+ protected String realAuthority;
+ protected URI realUri;
+
+
+
+ private Path swizzleParamPath(Path p) {
+ return new Path (realScheme, realAuthority, p.toUri().getPath());
+ }
+
+ private Path swizzleReturnPath(Path p) {
+ return new Path (myScheme, myAuthority, p.toUri().getPath());
+ }
+
+ private FileStatus swizzleFileStatus(FileStatus orig, boolean isParam) {
+ FileStatus ret =
+ new FileStatus(orig.getLen(), orig.isDir(), orig.getReplication(),
+ orig.getBlockSize(), orig.getModificationTime(),
+ orig.getPermission(),
+ orig.getOwner(), orig.getGroup(),
+ isParam ? swizzleParamPath(orig.getPath()) :
+ swizzleReturnPath(orig.getPath()));
+ return ret;
+ }
+
+ public ProxyFileSystem() {
+ throw new RuntimeException ("Unsupported constructor");
+ }
+
+ public ProxyFileSystem(FileSystem fs) {
+ throw new RuntimeException ("Unsupported constructor");
+ }
+
+ /**
+ * Create a proxy file system for fs.
+ *
+ * @param fs FileSystem to create proxy for
+ * @param myUri URI to use as proxy. Only the scheme and authority from
+ * this are used right now
+ */
+ public ProxyFileSystem(FileSystem fs, URI myUri) {
+ super(fs);
+
+ URI realUri = fs.getUri();
+ this.realScheme = realUri.getScheme();
+ this.realAuthority=realUri.getAuthority();
+ this.realUri = realUri;
+
+ this.myScheme = myUri.getScheme();
+ this.myAuthority=myUri.getAuthority();
+ this.myUri = myUri;
+ }
+
+ public void initialize(URI name, Configuration conf) throws IOException {
+ try {
+ URI realUri = new URI (realScheme, realAuthority,
+ name.getPath(), name.getQuery(), name.getFragment());
+ super.initialize(realUri, conf);
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public URI getUri() {
+ return myUri;
+ }
+
+ public String getName() {
+ return getUri().toString();
+ }
+
+ public Path makeQualified(Path path) {
+ return swizzleReturnPath(super.makeQualified(swizzleParamPath(path)));
+ }
+
+
+ protected void checkPath(Path path) {
+ super.checkPath(swizzleParamPath(path));
+ }
+
+ public BlockLocation[] getFileBlockLocations(FileStatus file, long start,
+ long len) throws IOException {
+ return super.getFileBlockLocations(swizzleFileStatus(file, true),
+ start, len);
+ }
+
+ public FSDataInputStream open(Path f, int bufferSize) throws IOException {
+ return super.open(swizzleParamPath(f), bufferSize);
+ }
+
+ public FSDataOutputStream append(Path f, int bufferSize,
+ Progressable progress) throws IOException {
+ return super.append(swizzleParamPath(f), bufferSize, progress);
+ }
+
+ public FSDataOutputStream create(Path f, FsPermission permission,
+ boolean overwrite, int bufferSize, short replication, long blockSize,
+ Progressable progress) throws IOException {
+ return super.create(swizzleParamPath(f), permission,
+ overwrite, bufferSize, replication, blockSize, progress);
+ }
+
+ public boolean setReplication(Path src, short replication) throws IOException {
+ return super.setReplication(swizzleParamPath(src), replication);
+ }
+
+ public boolean rename(Path src, Path dst) throws IOException {
+ return super.rename(swizzleParamPath(src), swizzleParamPath(dst));
+ }
+
+ public boolean delete(Path f, boolean recursive) throws IOException {
+ return super.delete(swizzleParamPath(f), recursive);
+ }
+
+ public boolean deleteOnExit(Path f) throws IOException {
+ return super.deleteOnExit(swizzleParamPath(f));
+ }
+
+ public FileStatus[] listStatus(Path f) throws IOException {
+ FileStatus[] orig = super.listStatus(swizzleParamPath(f));
+ FileStatus[] ret = new FileStatus [orig.length];
+ for (int i=0; i<orig.length; i++) {
+ ret[i] = swizzleFileStatus(orig[i], false);
+ }
+ return ret;
+ }
+
+ public Path getHomeDirectory() {
+ return swizzleReturnPath(super.getHomeDirectory());
+ }
+
+ public void setWorkingDirectory(Path newDir) {
+ super.setWorkingDirectory(swizzleParamPath(newDir));
+ }
+
+ public Path getWorkingDirectory() {
+ return swizzleReturnPath(super.getWorkingDirectory());
+ }
+
+ public boolean mkdirs(Path f, FsPermission permission) throws IOException {
+ return super.mkdirs(swizzleParamPath(f), permission);
+ }
+
+ public void copyFromLocalFile(boolean delSrc, Path src, Path dst)
+ throws IOException {
+ super.copyFromLocalFile(delSrc, swizzleParamPath(src), swizzleParamPath(dst));
+ }
+
+ public void copyFromLocalFile(boolean delSrc, boolean overwrite,
+ Path[] srcs, Path dst)
+ throws IOException {
+ super.copyFromLocalFile(delSrc, overwrite, srcs, swizzleParamPath(dst));
+ }
+
+ public void copyFromLocalFile(boolean delSrc, boolean overwrite,
+ Path src, Path dst)
+ throws IOException {
+ super.copyFromLocalFile(delSrc, overwrite, src, swizzleParamPath(dst));
+ }
+
+ public void copyToLocalFile(boolean delSrc, Path src, Path dst)
+ throws IOException {
+ super.copyToLocalFile(delSrc, swizzleParamPath(src), dst);
+ }
+
+ public Path startLocalOutput(Path fsOutputFile, Path tmpLocalFile)
+ throws IOException {
+ return super.startLocalOutput(swizzleParamPath(fsOutputFile), tmpLocalFile);
+ }
+
+ public void completeLocalOutput(Path fsOutputFile, Path tmpLocalFile)
+ throws IOException {
+ super.completeLocalOutput(swizzleParamPath(fsOutputFile), tmpLocalFile);
+ }
+
+ public long getUsed() throws IOException{
+ return super.getUsed();
+ }
+
+ public long getDefaultBlockSize() {
+ return super.getDefaultBlockSize();
+ }
+
+ public short getDefaultReplication() {
+ return super.getDefaultReplication();
+ }
+
+ public ContentSummary getContentSummary(Path f) throws IOException {
+ return super.getContentSummary(swizzleParamPath(f));
+ }
+
+ public FileStatus getFileStatus(Path f) throws IOException {
+ return swizzleFileStatus(super.getFileStatus(swizzleParamPath(f)), false);
+ }
+
+ public Configuration getConf() {
+ return super.getConf();
+ }
+
+ public void close() throws IOException {
+ super.close();
+ super.close();
+ }
+
+ public void setOwner(Path p, String username, String groupname
+ ) throws IOException {
+ super.setOwner(swizzleParamPath(p), username, groupname);
+ }
+
+ public void setPermission(Path p, FsPermission permission
+ ) throws IOException {
+ super.setPermission(swizzleParamPath(p), permission);
+ }
+}
+
Added: hadoop/hive/trunk/shims/src/0.18/java/org/apache/hadoop/fs/ProxyLocalFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/shims/src/0.18/java/org/apache/hadoop/fs/ProxyLocalFileSystem.java?rev=980297&view=auto
==============================================================================
--- hadoop/hive/trunk/shims/src/0.18/java/org/apache/hadoop/fs/ProxyLocalFileSystem.java (added)
+++ hadoop/hive/trunk/shims/src/0.18/java/org/apache/hadoop/fs/ProxyLocalFileSystem.java Thu Jul 29 02:41:14 2010
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.fs;
+
+import java.io.*;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.permission.FsPermission;
+import org.apache.hadoop.util.Progressable;
+
+/****************************************************************
+ * A Proxy for LocalFileSystem
+ *
+ * Serves uri's corresponding to 'pfile:///' namespace with using
+ * a LocalFileSystem
+ *****************************************************************/
+
+public class ProxyLocalFileSystem extends FilterFileSystem {
+
+ protected LocalFileSystem localFs;
+
+ public ProxyLocalFileSystem() {
+ localFs = new LocalFileSystem();
+ }
+
+ public ProxyLocalFileSystem(FileSystem fs) {
+ throw new RuntimeException ("Unsupported Constructor");
+ }
+
+ @Override
+ public void initialize(URI name, Configuration conf) throws IOException {
+ // create a proxy for the local filesystem
+ // the scheme/authority serving as the proxy is derived
+ // from the supplied URI
+
+ String scheme = name.getScheme();
+ String authority = name.getAuthority() != null ? name.getAuthority() : "";
+ String proxyUriString = name + "://" + authority + "/";
+ fs = new ProxyFileSystem(localFs, URI.create(proxyUriString));
+
+ fs.initialize(name, conf);
+ }
+}
Added: hadoop/hive/trunk/shims/src/0.19/java/org/apache/hadoop/fs/ProxyFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/shims/src/0.19/java/org/apache/hadoop/fs/ProxyFileSystem.java?rev=980297&view=auto
==============================================================================
--- hadoop/hive/trunk/shims/src/0.19/java/org/apache/hadoop/fs/ProxyFileSystem.java (added)
+++ hadoop/hive/trunk/shims/src/0.19/java/org/apache/hadoop/fs/ProxyFileSystem.java Thu Jul 29 02:41:14 2010
@@ -0,0 +1,264 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.fs;
+
+import java.io.*;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.permission.FsPermission;
+import org.apache.hadoop.util.Progressable;
+
+/****************************************************************
+ * A FileSystem that can serve a given scheme/authority using some
+ * other file system. In that sense, it serves as a proxy for the
+ * real/underlying file system
+ *****************************************************************/
+
+public class ProxyFileSystem extends FilterFileSystem {
+
+ protected String myScheme;
+ protected String myAuthority;
+ protected URI myUri;
+
+ protected String realScheme;
+ protected String realAuthority;
+ protected URI realUri;
+
+
+
+ private Path swizzleParamPath(Path p) {
+ return new Path (realScheme, realAuthority, p.toUri().getPath());
+ }
+
+ private Path swizzleReturnPath(Path p) {
+ return new Path (myScheme, myAuthority, p.toUri().getPath());
+ }
+
+ private FileStatus swizzleFileStatus(FileStatus orig, boolean isParam) {
+ FileStatus ret =
+ new FileStatus(orig.getLen(), orig.isDir(), orig.getReplication(),
+ orig.getBlockSize(), orig.getModificationTime(),
+ orig.getAccessTime(), orig.getPermission(),
+ orig.getOwner(), orig.getGroup(),
+ isParam ? swizzleParamPath(orig.getPath()) :
+ swizzleReturnPath(orig.getPath()));
+ return ret;
+ }
+
+ public ProxyFileSystem() {
+ throw new RuntimeException ("Unsupported constructor");
+ }
+
+ public ProxyFileSystem(FileSystem fs) {
+ throw new RuntimeException ("Unsupported constructor");
+ }
+
+ /**
+ * Create a proxy file system for fs.
+ *
+ * @param fs FileSystem to create proxy for
+ * @param myUri URI to use as proxy. Only the scheme and authority from
+ * this are used right now
+ */
+ public ProxyFileSystem(FileSystem fs, URI myUri) {
+ super(fs);
+
+ URI realUri = fs.getUri();
+ this.realScheme = realUri.getScheme();
+ this.realAuthority=realUri.getAuthority();
+ this.realUri = realUri;
+
+ this.myScheme = myUri.getScheme();
+ this.myAuthority=myUri.getAuthority();
+ this.myUri = myUri;
+ }
+
+ public void initialize(URI name, Configuration conf) throws IOException {
+ try {
+ URI realUri = new URI (realScheme, realAuthority,
+ name.getPath(), name.getQuery(), name.getFragment());
+ super.initialize(realUri, conf);
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public URI getUri() {
+ return myUri;
+ }
+
+ public String getName() {
+ return getUri().toString();
+ }
+
+ public Path makeQualified(Path path) {
+ return swizzleReturnPath(super.makeQualified(swizzleParamPath(path)));
+ }
+
+
+ protected void checkPath(Path path) {
+ super.checkPath(swizzleParamPath(path));
+ }
+
+ public BlockLocation[] getFileBlockLocations(FileStatus file, long start,
+ long len) throws IOException {
+ return super.getFileBlockLocations(swizzleFileStatus(file, true),
+ start, len);
+ }
+
+ public FSDataInputStream open(Path f, int bufferSize) throws IOException {
+ return super.open(swizzleParamPath(f), bufferSize);
+ }
+
+ public FSDataOutputStream append(Path f, int bufferSize,
+ Progressable progress) throws IOException {
+ return super.append(swizzleParamPath(f), bufferSize, progress);
+ }
+
+ public FSDataOutputStream create(Path f, FsPermission permission,
+ boolean overwrite, int bufferSize, short replication, long blockSize,
+ Progressable progress) throws IOException {
+ return super.create(swizzleParamPath(f), permission,
+ overwrite, bufferSize, replication, blockSize, progress);
+ }
+
+ public boolean setReplication(Path src, short replication) throws IOException {
+ return super.setReplication(swizzleParamPath(src), replication);
+ }
+
+ public boolean rename(Path src, Path dst) throws IOException {
+ return super.rename(swizzleParamPath(src), swizzleParamPath(dst));
+ }
+
+ public boolean delete(Path f, boolean recursive) throws IOException {
+ return super.delete(swizzleParamPath(f), recursive);
+ }
+
+ public boolean deleteOnExit(Path f) throws IOException {
+ return super.deleteOnExit(swizzleParamPath(f));
+ }
+
+ public FileStatus[] listStatus(Path f) throws IOException {
+ FileStatus[] orig = super.listStatus(swizzleParamPath(f));
+ FileStatus[] ret = new FileStatus [orig.length];
+ for (int i=0; i<orig.length; i++) {
+ ret[i] = swizzleFileStatus(orig[i], false);
+ }
+ return ret;
+ }
+
+ public Path getHomeDirectory() {
+ return swizzleReturnPath(super.getHomeDirectory());
+ }
+
+ public void setWorkingDirectory(Path newDir) {
+ super.setWorkingDirectory(swizzleParamPath(newDir));
+ }
+
+ public Path getWorkingDirectory() {
+ return swizzleReturnPath(super.getWorkingDirectory());
+ }
+
+ public boolean mkdirs(Path f, FsPermission permission) throws IOException {
+ return super.mkdirs(swizzleParamPath(f), permission);
+ }
+
+ public void copyFromLocalFile(boolean delSrc, Path src, Path dst)
+ throws IOException {
+ super.copyFromLocalFile(delSrc, swizzleParamPath(src), swizzleParamPath(dst));
+ }
+
+ public void copyFromLocalFile(boolean delSrc, boolean overwrite,
+ Path[] srcs, Path dst)
+ throws IOException {
+ super.copyFromLocalFile(delSrc, overwrite, srcs, swizzleParamPath(dst));
+ }
+
+ public void copyFromLocalFile(boolean delSrc, boolean overwrite,
+ Path src, Path dst)
+ throws IOException {
+ super.copyFromLocalFile(delSrc, overwrite, src, swizzleParamPath(dst));
+ }
+
+ public void copyToLocalFile(boolean delSrc, Path src, Path dst)
+ throws IOException {
+ super.copyToLocalFile(delSrc, swizzleParamPath(src), dst);
+ }
+
+ public Path startLocalOutput(Path fsOutputFile, Path tmpLocalFile)
+ throws IOException {
+ return super.startLocalOutput(swizzleParamPath(fsOutputFile), tmpLocalFile);
+ }
+
+ public void completeLocalOutput(Path fsOutputFile, Path tmpLocalFile)
+ throws IOException {
+ super.completeLocalOutput(swizzleParamPath(fsOutputFile), tmpLocalFile);
+ }
+
+ public long getUsed() throws IOException{
+ return super.getUsed();
+ }
+
+ public long getDefaultBlockSize() {
+ return super.getDefaultBlockSize();
+ }
+
+ public short getDefaultReplication() {
+ return super.getDefaultReplication();
+ }
+
+ public ContentSummary getContentSummary(Path f) throws IOException {
+ return super.getContentSummary(swizzleParamPath(f));
+ }
+
+ public FileStatus getFileStatus(Path f) throws IOException {
+ return swizzleFileStatus(super.getFileStatus(swizzleParamPath(f)), false);
+ }
+
+ public FileChecksum getFileChecksum(Path f) throws IOException {
+ return super.getFileChecksum(swizzleParamPath(f));
+ }
+
+ public Configuration getConf() {
+ return super.getConf();
+ }
+
+ public void close() throws IOException {
+ super.close();
+ super.close();
+ }
+
+ public void setOwner(Path p, String username, String groupname
+ ) throws IOException {
+ super.setOwner(swizzleParamPath(p), username, groupname);
+ }
+
+ public void setTimes(Path p, long mtime, long atime
+ ) throws IOException {
+ super.setTimes(swizzleParamPath(p), mtime, atime);
+ }
+
+ public void setPermission(Path p, FsPermission permission
+ ) throws IOException {
+ super.setPermission(swizzleParamPath(p), permission);
+ }
+}
+
Added: hadoop/hive/trunk/shims/src/0.19/java/org/apache/hadoop/fs/ProxyLocalFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/shims/src/0.19/java/org/apache/hadoop/fs/ProxyLocalFileSystem.java?rev=980297&view=auto
==============================================================================
--- hadoop/hive/trunk/shims/src/0.19/java/org/apache/hadoop/fs/ProxyLocalFileSystem.java (added)
+++ hadoop/hive/trunk/shims/src/0.19/java/org/apache/hadoop/fs/ProxyLocalFileSystem.java Thu Jul 29 02:41:14 2010
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.fs;
+
+import java.io.*;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.permission.FsPermission;
+import org.apache.hadoop.util.Progressable;
+
+/****************************************************************
+ * A Proxy for LocalFileSystem
+ *
+ * Serves uri's corresponding to 'pfile:///' namespace with using
+ * a LocalFileSystem
+ *****************************************************************/
+
+public class ProxyLocalFileSystem extends FilterFileSystem {
+
+ protected LocalFileSystem localFs;
+
+ public ProxyLocalFileSystem() {
+ localFs = new LocalFileSystem();
+ }
+
+ public ProxyLocalFileSystem(FileSystem fs) {
+ throw new RuntimeException ("Unsupported Constructor");
+ }
+
+ @Override
+ public void initialize(URI name, Configuration conf) throws IOException {
+ // create a proxy for the local filesystem
+ // the scheme/authority serving as the proxy is derived
+ // from the supplied URI
+
+ String scheme = name.getScheme();
+ String authority = name.getAuthority() != null ? name.getAuthority() : "";
+ String proxyUriString = name + "://" + authority + "/";
+ fs = new ProxyFileSystem(localFs, URI.create(proxyUriString));
+
+ fs.initialize(name, conf);
+ }
+}