title: Initialize public static variable in Hadoop through arguments
body: <p>I have a problem with changing public static variables in Hadoop.
  I am trying to pass some values as arguments to the jar file from  command line.</p>
  
  <p>here is my code:</p>
  
  <pre><code>public class MyClass {
    public static long myvariable1 = 100;
    public static class Map extends Mapper&lt;Object, Text, Text, Text&gt; {
      public static long myvariabl2 = 200;
      public void map(Object key, Text value, Context context) throws IOException, InterruptedException {
  
      }
    }
    public static class Reduce extends Reducer&lt;Text, Text, Text, Text&gt; {
      public void reduce(Text key, Iterable&lt;Text&gt; values, Context context)
      throws IOException, InterruptedException {
  
      }
    }
    public static void main(String[] args) throws Exception {
      col_no = Long.parseLong(args[0]);
      Map.myvariable1 = Long.parseLong(args[1]);
      Map.myvariable2 = Long.parseLong(args[1]);
      other stuff here
    }
  }
  </code></pre>
  
  <p>But it is not working, myvariable1 &amp; myvaribale2 always have 100 &amp; 200.
  I use Hadoop 0.20.203 with Ubuntu 10.04</p>