title: Performence issue while using curl in Scala
body: <p>I am trying to fetch one column from Hive and based on the value of that column, I need to execute <code>curl</code> command. </p>
  
  <p>This is how I am generating my Column list</p>
  
  <pre><code>val list = hiveContext.sql("select application_number from t").collect()
  
  for(l1 &lt;- list) {
      val z = a.toString().replace("[", "").replace("]", "")
      val cmd = Seq("curl", "-X", "POST", "--insecure", "--header",
                    "Content-Type: application/json", "--header", 
                    "Accept: application/json", "-d", 
                    "{\"searchText\":\"+'z'+\",\"qf\":\"applId\"}", "https://link")
      val r = cmd.!!
  }
  </code></pre>
  
  <p>Now, I have stored the data in <code>r</code> variable in a perfect manner.</p>
  
  <p>But my list has 10 million records. So it takes lot of time while iterating over it.</p>
  
  <p>Is there a better way to do this?</p>