title: Flink, odd behavior when using Hadoop Compatibility
body: <p>I've add Flink Hadoop Compatibility to the project which reads sequence file from hdfs path, </p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.apache.flink&lt;/groupId&gt;
      &lt;artifactId&gt;flink-hadoop-compatibility_2.11&lt;/artifactId&gt;
      &lt;version&gt;1.5.6&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Here's the java code snippet, </p>
  
  <pre><code>DataSource&lt;Tuple2&lt;NullWritable, BytesWritable&gt;&gt; input = env.createInput(HadoopInputs.readHadoopFile(
      new org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat&lt;NullWritable, BytesWritable&gt;(),
      NullWritable.class, BytesWritable.class, path));
  </code></pre>
  
  <p>This works pretty fine when I run it inside my Eclipse, but when I submit it via command line 'flink run ...', it complains,</p>
  
  <pre><code>The type returned by the input format could not be automatically determined. Please specify the TypeInformation of the produced type explicitly by using the 'createInput(InputFormat, TypeInformation)' method instead.
  </code></pre>
  
  <p>OK, so I update my code to add type information, </p>
  
  <pre><code>DataSource&lt;Tuple2&lt;NullWritable, BytesWritable&gt;&gt; input = env.createInput(HadoopInputs.readHadoopFile(
      new org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat&lt;NullWritable, BytesWritable&gt;(),
      NullWritable.class, BytesWritable.class, path),
      TypeInformation.of(new TypeHint&lt;Tuple2&lt;NullWritable, BytesWritable&gt;&gt;() {}));
  </code></pre>
  
  <p>Now it complains,</p>
  
  <pre><code>Caused by: java.lang.RuntimeException: Could not load the TypeInformation for the class 'org.apache.hadoop.io.Writable'. You may be missing the 'flink-hadoop-compatibility' dependency.
  </code></pre>
  
  <p>Some people suggest to copy flink-hadoop-compatibility_2.11-1.5.6.jar to FLINK_HOME/lib, but it doesn't help, still same error.</p>
  
  <p>Does anyone have any clue?</p>
  
  <p>My Flink is a standalone installation, version 1.5.6.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Sorry, I copied flink-hadoop-compatibility_2.11-1.5.6.jar to the wrong place, after fixing that, it works.</p>
  
  <p>Now my question is, is there any other way to go? Because copying that jar file to FLINK_HOME/lib is definitely not a good idea to me, especially when talking about a big flink cluster.</p>