Git Product home page Git Product logo

Comments (5)

matthewwardrop avatar matthewwardrop commented on July 19, 2024

Hi @djKooks,

It looks like you're directing the HiveServer2Client to the SSH port of the remote service, which is almost certainly not what you want to do. Do you have a HiveServer2 instance running?

from omniduct.

kination avatar kination commented on July 19, 2024

@matthewwardrop thanks for reply.
Yes, I'm trying to access hive in remote machine(virtualbox instance). If my usage is wrong, please let me know.

Thanks.

from omniduct.

matthewwardrop avatar matthewwardrop commented on July 19, 2024

If the remote machine has a hiveserver2 instance, and the ports associated with the instance are exposed, you can just directly connect to it.

from omniduct.databases.hiveserver2 import HiveServer2Client

hsc = HiveServer2Client(
    host='192.168.56.1',  # IP address of virtual machine 
    port=3623,  # Port of HiveServer2 instance (typically 3623)
    driver='pyhive'  # Recommended over impyla
)

hsc.connect()

If the HiveServer2 instance is not exposed, then you will need to use port-forwarding via SSH.

from omniduct.databases.hiveserver2 import HiveServer2Client
from omniduct.remotes.ssh import SSHClient

remote = SSHClient(
     host='192.168.56.1',  # IP address of virtual machine 
     port=22,  # Port of SSH server
)

hsc = HiveServer2Client(
    host='127.0.0.1',  # IP address of localhost 
    port=3623,  # Port of HiveServer2 instance (typically 3623)
    remote=remote
)

hsc.connect()

Hope that helps.

from omniduct.

kination avatar kination commented on July 19, 2024

@matthewwardrop thanks! I'll check again later and let you know.

from omniduct.

kination avatar kination commented on July 19, 2024

@matthewwardrop sorry for late.
It seems it is problem of hive server connection, because it also causes on other modules such as pyhive or impyla.
I'll reopen it if I found a problem in here.

Thanks.

from omniduct.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.