title: not able to read input file in storm spout
body: <p>I have a Storm Spout that will read from a log file. So when I test the code locally its works well because I am passing run-time arguments while running the Job. </p>
  
  <p>But when I am deploying the code in a cluster it gives a <code>FileNotFoundException</code>. </p>
  
  <p>So my question is how to pass an input to a Spout in a cluster system. </p>
  
  <p>I am using resource location to pass few Lookup tables to Bolts, but if I pass in the same way to Spout it gives the same error.</p>
  
  <p>I also tried to pass the argument to <code>conf.put("logfile", args[0]);</code> in the driver class and the spout should read the conf object in its <code>open()</code> method. That also is not working.</p>
  
  <pre><code>public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
          collector_out = collector;
  
          try {
              this.context = context;
              this.filereader = new FileReader(conf.get("logfile").toString());
          } catch (FileNotFoundException e) {
              throw new RuntimeException("Error reading file ["+conf.get("logfile")+"]");
          }
  
  }
  
  public void nextTuple() {
      try {
          br = new BufferedReader(filereader);
          line = br.readLine();           
          while(line != null){
              count++;
              collector_out.emit(new Values(line));
              Thread.sleep(2);
              line = br.readLine();
          }
      } catch (IOException e) {
          e.printStackTrace();
      } catch (InterruptedException e) {
          e.printStackTrace();
      } 
      finally{
          completed = true;
      }
  }
  </code></pre>
  
  <p>So if any idea how to get it going that would be a great help.</p>