Member since
10-08-2018
2
Posts
1
Kudos Received
0
Solutions
05-28-2019
05:56 AM
Another possible reason is that the file is not existing on the node where Hive server is running. The file needs to be present on the node where Hive server is running. Sometimes Hive server might not be running on the same node from where you are invoking the beeline client.
... View more
12-13-2018
02:09 PM
1 Kudo
Many a time, there are instances where one wants to deploy the Atlas UI changes (like static htmls, images, css and js files) which are built locally while remotely connecting to an Atlas server backend. This way, you don't really have to install Atlas (and other dependent services) on your local machine In order to achieve this, one can set up a local grunt server with the below-mentioned steps Install npm (npm is a node package manager, used for nodejs projects) Checkout the Atlas codebase Navigate to <workspace_directory>/dashboardv2 folder Tunnel (add Local Port Forwarding) to Atlas instance deployed on a remote cluster using the following command ssh -i <private_key> -L <local_port>:<cluster_host>:<cluster_port> <user_name>@<cluster_host> Once you execute the above command, all the requests being sent to http://localhost:21000 will be redirected to our remote Atlas instance running at http://<cluster_host>:<cluster_port>; Now hit, http://localhost:21000. You will see the Atlas UI. Login with the credentials. Start local grunt server using following command npm run dev Grunt server listens on port #9999 and uses port #21000 for backend connections. Since we have added local port forwarding of 21000 port to our remote Atlas instance, the backend requests coming via local UI will automatically be redirected to remote Atlas host. Once the grunt server starts, hit http://localhost:9999 Finally, the UI you see on the browser is served from the local files, whereas the backend will be served from the remotely deployed Atlas. Once the above is done, you can just navigate to dashboardv2 folder and edit the css, html, js and images as you like. The changes will be immediately reflected in the browser, all you have to do is refresh the page. No need of building any changes, copying them to remote cluster or re-deploying them. Note:
There was one issue observed where local grunt server was caching some images. If the changes are not reflecting correctly on the UI, then stop and start the grunt server, which takes around a second. Grunt server is configured to read the /public folder in the current directory where it is running, that is the reason we need to start the server from dashboardv2 folder. Dashboardv2 folder has /public directory, which in turn has all the images, css, js and html. It is defined in gruntfile.js module.exports = function(grunt) {
varbuildTime = newDate().getTime(),
distPath ='./dist/',
libPath = distPath + 'js/libs/',
isDashboardDirectory = grunt.file.isDir('public'),
nodeModulePath ='./node_modules/',
modulesPath ='public/';
if(!isDashboardDirectory) {
modulesPath ='../public/'
} Local Port Forwarding can be avoided if you directly edit the gruntfile.js. You just have change 127.0.0.1 to remote Atlas host. proxies: [{
context:'/api',// the context of the data service
host:'127.0.0.1',
port:21000,// the port that the data service is running on
https:false
}]
... View more
Labels: