title: java client to connect remote hadoop machine error
body: <p>I am writing a java client program which can interact with remote hadoop cluster and prints all the jobs which are running.</p>
  
  <p>my local machine is able to ping the remote machine where hadoop is running.
  i tried below code, and stuck up with parameters. where can i get these configuration parameter values</p>
  
  <pre><code>Configuration conf = new Configuration();
  // this should be like defined in your mapred-site.xml
  conf.set("mapred.job.tracker", "Hadoopmaster:54311"); 
  // like defined in hdfs-site.xml
  conf.set("fs.default.name", "hdfs://namenode.com:9000");
  
  System.out.println("got configuration : "+conf);
  InetSocketAddress jobtracker = new InetSocketAddress("jobtracker.mapredhost.myhost", 8021);
  JobClient jobClient = new JobClient(jobtracker, conf);
  JobStatus[] jobs = jobClient.jobsToComplete();
  
          for (int i = 0; i &lt; jobs.length; i++) {
              JobStatus js = jobs[i];
              if (js.getRunState() == JobStatus.RUNNING) {
                  JobID jobId = js.getJobID();
                  System.out.println(jobId);
              }
          }
      }
  </code></pre>
  
  <p><strong>map-red.xml</strong></p>
  
  <pre><code>&lt;property&gt;
    &lt;name&gt;mapred.job.tracker&lt;/name&gt;
    &lt;value&gt;Hadoopmaster:54311&lt;/value&gt;
    &lt;description&gt;test &lt;/description&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p><strong>core-site.xml</strong></p>
  
  <pre><code>&lt;property&gt;
    &lt;name&gt;fs.default.name&lt;/name&gt;
    &lt;value&gt;hdfs://Hadoopmaster:54310&lt;/value&gt;
    &lt;description&gt;test.&lt;/description&gt;
  &lt;/property&gt;
  </code></pre>