简体   繁体   中英

How can I set up a Scala/Java workflow to remote deploy jar and remote debug THROUGH a jumpserver?

Within my organization, I'm tasked with doing some Spark development and I'm trying to use Scala, but much of the other code is Java. I'm managing dependencies with Maven. My code ultimately will work and run on an edge node of a Hadoop cluster (Cloudera).

This edge node is only accessible via SSH through a jumpserver, and I'm struggling to find an efficient workflow. The others on this team have been debugging via including print statements, building .jars locally, copying them to the edge node via WinSCP, and then running them via command line on a Putty session (SSHed into jumpserver, then using SSH command in that session to connect to edge node).

me -> jumpserver -> edge node

I am wondering what a solution would be such that a jar can quickly be built and put on this server and have it run in that environment while being connected for remote debugging.

Eclipse and IntelliJ both have facilities for remote debugging, but can this be made to work through a jumpserver, and when we can only do it through SSH?

Would it work to somehow map a directory on the edge node to my local filesystem and have the IDE put the .jar there and debug it there?

--- Keeping in mind that the .jar would really need to be in the edge node's server context/environment (for Spark/Hadoop hdfs), so this wouldn't work if the .jar would try to use my local Windows environment

What solutions are there to this? Thanks!

Optional other info:

We have Jenkins running to where code automatically built each time we check in code changes, and we have a build/deployment management service in-house that can be configured to actually output a .jar and optionally deploy it to a server. This, however, is much too slow to be practical for running code to check changes and doesn't solve the debugging issue.

Can you check jsch java library by which you can connect to unix server and pass your required command. In your case you need to connect to jumphost and then pass commands like your edge node host and required commands.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM