Project: springxd
Issue XD-1330: Enhance HadoopFileSystemTestSupport to obtain resource for a specific hadoop distro
It looks like the HadoopFileSystemTestSupport test rule by default runs against hadoop 1.2 and we can add a way to support running the hadoop centric tests to run against a given hadoop distro. Currently, if the test is run against a version other than 1.2, the rule says: 15:47:34,469 ERROR main hadoop.HadoopFileSystemTestSupport:95 - HADOOP_FS IS NOT AVAILABLE, SKIPPING TESTS org.apache.hadoop.ipc.RemoteException: Server IPC version 9 cannot communicate with client version 4 org.apache.hadoop.ipc.Client.call(Client.java:1113) org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:229) com.sun.proxy.$Proxy8.getProtocolVersion(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:601) org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:85) org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:62) com.sun.proxy.$Proxy8.getProtocolVersion(Unknown Source) org.apache.hadoop.ipc.RPC.checkVersion(RPC.java:422) org.apache.hadoop.hdfs.DFSClient.createNamenode(DFSClient.java:183) org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:281) org.apache.hadoop.hdfs.DFSClient.(DFSClient.java:245) org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:100) org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1446) org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:67) org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1464) org.apache.hadoop.fs.FileSystem.get(FileSystem.java:263) org.apache.hadoop.fs.FileSystem.get(FileSystem.java:124) org.springframework.xd.test.hadoop.HadoopFileSystemTestSupport.obtainResource(HadoopFileSystemTestSupport.java:49) org.springframework.xd.test.AbstractExternalResourceTestSupport.apply(AbstractExternalResourceTestSupport.java:58) org.junit.rules.RunRules.applyAll(RunRules.java:26) org.junit.rules.RunRules.(RunRules.java:15) org.junit.runners.BlockJUnit4ClassRunner.withTestRules(BlockJUnit4ClassRunner.java:379) org.junit.runners.BlockJUnit4ClassRunner.withRules(BlockJUnit4ClassRunner.java:340) org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:256) org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) org.junit.runners.ParentRunner.run(ParentRunner.java:309) org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Story points: 3