How to run presto queries in python using pyhive?How do I check whether a file exists without exceptions?Calling an external command in PythonWhat are metaclasses in Python?Is there a way to run Python on Android?How can I safely create a nested directory?Does Python have a ternary conditional operator?How to get the current time in PythonHow can I make a time delay in Python?Does Python have a string 'contains' substring method?

When is it legal to castle moving the rook first?

What exactly is a softlock?

Archiving processor does not archive

Why do we need explainable AI?

Does POSIX guarantee the paths to any standard utilities?

Count rook moves 1D

What would a biological creature need in order to see the future?

Were the women of Travancore, India, taxed for covering their breasts by breast size?

How does Harry wear the invisibility cloak?

Does this bike use hydraulic brakes?

Is there any reason to change the ISO manually?

To which airspace does the border of two adjacent airspaces belong to?

Why did the Joi advertisement trigger K?

How can I let authenticated users rebuild caches?

Everyone for non livings

What is the most likely cause of short, quick, and useless reviews?

Plotting level sets of the form f(x,y,c)==0

How can I use arrays in a PGF axis environment?

Would you recommend a keyboard for beginners with or without lights in keys for learning?

What does "se jouer" mean here?

Do I need to get a noble in order to win Splendor?

Is mathematics truth?

Confusion in understanding control system?

How do I name the individual parts of the lumbricals muscle of the foot in latin?



How to run presto queries in python using pyhive?


How do I check whether a file exists without exceptions?Calling an external command in PythonWhat are metaclasses in Python?Is there a way to run Python on Android?How can I safely create a nested directory?Does Python have a ternary conditional operator?How to get the current time in PythonHow can I make a time delay in Python?Does Python have a string 'contains' substring method?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I am trying to run presto query in python using pyhive library but max retries error is coming. I am running it in jupyter notebook locally(laptop). I think its not able to connect to presto node. I am using Azure hdinsight cluster and installed presto application on head node(using starburst distribution). I have used cluster user name and password and also i have tried head node ssh user and password but nothing is working. Below is my code:



from pyhive import presto
conn= presto.connect(
host='clustername-ssh.azurehdinsight.net',
port=8085,
username='sshuser'
password='sshpassword',
protocol='https'
).cursor()
conn.execute('SELECT * FROM hive.default.parquettest limit 1')


The error i am getting is:




ConnectionError:
HTTPConnectionPool(host='sm-hdinsight01-ssh.azurehdinsight.net',
port=8085): Max retries exceeded with url: /v1/statement (Caused by
NewConnectionError(': Failed to establish a new connection: [Errno 110]
Connection timed out',))




But when i am running it in terminal of head node it works:



from pyhive import presto
conn= presto.connect(
host='localhost',
port=8085).cursor()
conn.execute('SELECT * FROM hive.default.parquettest limit 1')


I think i am missing some crucial thing here. please help.










share|improve this question
































    0















    I am trying to run presto query in python using pyhive library but max retries error is coming. I am running it in jupyter notebook locally(laptop). I think its not able to connect to presto node. I am using Azure hdinsight cluster and installed presto application on head node(using starburst distribution). I have used cluster user name and password and also i have tried head node ssh user and password but nothing is working. Below is my code:



    from pyhive import presto
    conn= presto.connect(
    host='clustername-ssh.azurehdinsight.net',
    port=8085,
    username='sshuser'
    password='sshpassword',
    protocol='https'
    ).cursor()
    conn.execute('SELECT * FROM hive.default.parquettest limit 1')


    The error i am getting is:




    ConnectionError:
    HTTPConnectionPool(host='sm-hdinsight01-ssh.azurehdinsight.net',
    port=8085): Max retries exceeded with url: /v1/statement (Caused by
    NewConnectionError(': Failed to establish a new connection: [Errno 110]
    Connection timed out',))




    But when i am running it in terminal of head node it works:



    from pyhive import presto
    conn= presto.connect(
    host='localhost',
    port=8085).cursor()
    conn.execute('SELECT * FROM hive.default.parquettest limit 1')


    I think i am missing some crucial thing here. please help.










    share|improve this question




























      0












      0








      0








      I am trying to run presto query in python using pyhive library but max retries error is coming. I am running it in jupyter notebook locally(laptop). I think its not able to connect to presto node. I am using Azure hdinsight cluster and installed presto application on head node(using starburst distribution). I have used cluster user name and password and also i have tried head node ssh user and password but nothing is working. Below is my code:



      from pyhive import presto
      conn= presto.connect(
      host='clustername-ssh.azurehdinsight.net',
      port=8085,
      username='sshuser'
      password='sshpassword',
      protocol='https'
      ).cursor()
      conn.execute('SELECT * FROM hive.default.parquettest limit 1')


      The error i am getting is:




      ConnectionError:
      HTTPConnectionPool(host='sm-hdinsight01-ssh.azurehdinsight.net',
      port=8085): Max retries exceeded with url: /v1/statement (Caused by
      NewConnectionError(': Failed to establish a new connection: [Errno 110]
      Connection timed out',))




      But when i am running it in terminal of head node it works:



      from pyhive import presto
      conn= presto.connect(
      host='localhost',
      port=8085).cursor()
      conn.execute('SELECT * FROM hive.default.parquettest limit 1')


      I think i am missing some crucial thing here. please help.










      share|improve this question
















      I am trying to run presto query in python using pyhive library but max retries error is coming. I am running it in jupyter notebook locally(laptop). I think its not able to connect to presto node. I am using Azure hdinsight cluster and installed presto application on head node(using starburst distribution). I have used cluster user name and password and also i have tried head node ssh user and password but nothing is working. Below is my code:



      from pyhive import presto
      conn= presto.connect(
      host='clustername-ssh.azurehdinsight.net',
      port=8085,
      username='sshuser'
      password='sshpassword',
      protocol='https'
      ).cursor()
      conn.execute('SELECT * FROM hive.default.parquettest limit 1')


      The error i am getting is:




      ConnectionError:
      HTTPConnectionPool(host='sm-hdinsight01-ssh.azurehdinsight.net',
      port=8085): Max retries exceeded with url: /v1/statement (Caused by
      NewConnectionError(': Failed to establish a new connection: [Errno 110]
      Connection timed out',))




      But when i am running it in terminal of head node it works:



      from pyhive import presto
      conn= presto.connect(
      host='localhost',
      port=8085).cursor()
      conn.execute('SELECT * FROM hive.default.parquettest limit 1')


      I think i am missing some crucial thing here. please help.







      python database-connection hdinsight presto pyhive






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 4:47







      Bhanuday Birla

















      asked Mar 27 at 13:06









      Bhanuday BirlaBhanuday Birla

      3213 silver badges16 bronze badges




      3213 silver badges16 bronze badges

























          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377970%2fhow-to-run-presto-queries-in-python-using-pyhive%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55377970%2fhow-to-run-presto-queries-in-python-using-pyhive%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript