[GitHub] jongyoul commented on a change in pull request #3272: [ZEPPELIN-3422] Add JMX Support
jongyoul commented on a change in pull request #3272: [ZEPPELIN-3422] Add JMX Support URL: https://github.com/apache/zeppelin/pull/3272#discussion_r243959951 ## File path: zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java ## @@ -177,6 +183,51 @@ public void contextDestroyed(ServletContextEvent servletContextEvent) {} // Notebook server setupNotebookServer(webApp, conf, sharedServiceLocator); +// JMX Enable +Stream.of("ZEPPELIN_JMX_ENABLE") +.map(System::getenv) +.map(Boolean::parseBoolean) +.filter(Boolean::booleanValue) +.map(jmxEnabled -> "ZEPPELIN_JMX_PORT") +.map(System::getenv) +.map( +portString -> { + try { +return Integer.parseInt(portString); + } catch (Exception e) { +return null; + } +}) +.filter(Objects::nonNull) +.forEach( +port -> { + try { +MBeanContainer mbeanContainer = +new MBeanContainer(ManagementFactory.getPlatformMBeanServer()); +jettyWebServer.addEventListener(mbeanContainer); +jettyWebServer.addBean(mbeanContainer); + +JMXServiceURL jmxURL = +new JMXServiceURL( +String.format( + "service:jmx:rmi://0.0.0.0:%d/jndi/rmi://0.0.0.0:%d/jmxrmi", +port, port)); +ConnectorServer jmxServer = +new ConnectorServer(jmxURL, "org.eclipse.jetty.jmx:name=rmiconnectorserver"); +jettyWebServer.addBean(jmxServer); + +// Add JMX Beans +// TODO(jl): Need to investigate more about injection and jmx +jettyWebServer.addBean( + sharedServiceLocator.getService(InterpreterSettingManager.class)); + jettyWebServer.addBean(sharedServiceLocator.getService(NotebookServer.class)); + +LOG.info("JMX Enabled with port: {}", port); + } catch (Exception e) { +LOG.info("Error while setting JMX", e); Review comment: Make sense This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] Savalek opened a new pull request #3274: [ZP-94] Синхронизация с Apache
Savalek opened a new pull request #3274: [ZP-94] Синхронизация с Apache URL: https://github.com/apache/zeppelin/pull/3274 ### Jira issue ZP-94 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] Savalek closed pull request #3274: [ZP-94] Синхронизация с Apache
Savalek closed pull request #3274: [ZP-94] Синхронизация с Apache URL: https://github.com/apache/zeppelin/pull/3274 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java index 4d258342b8..9e1e5dd465 100644 --- a/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java +++ b/jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java @@ -729,7 +729,11 @@ private InterpreterResult executeSql(String propertyKey, String sql, getProperty(String.format(STATEMENT_PRECODE_KEY_TEMPLATE, propertyKey)); if (StringUtils.isNotBlank(statementPrecode)) { -statement.execute(statementPrecode); +String noteId = interpreterContext.getNoteId(); +String contextStatementPrecode = statementPrecode +.replace("#{noteId}", noteId != null ? noteId : "") +.replace("#{user}", user); +statement.execute(contextStatementPrecode); } boolean isResultSetAvailable = statement.execute(sqlToExecute); diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java index 030ddeb2bd..d1481ea265 100644 --- a/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java +++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java @@ -109,6 +109,8 @@ protected void createNewNote() { WebDriverWait block = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC); block.until(ExpectedConditions.visibilityOfElementLocated(By.id("noteCreateModal"))); +WebElement element = pollingWait(By.xpath("//*[@id=\"noteName\"]"), MAX_BROWSER_TIMEOUT_SEC); +element.sendKeys(element.getAttribute("value").replaceFirst(".*/", "")); clickAndWait(By.id("createNoteButton")); block.until(ExpectedConditions.invisibilityOfElementLocated(By.id("createNoteButton"))); } diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java index 40c7461caf..cb46382fa9 100644 --- a/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java +++ b/zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java @@ -1611,10 +1611,12 @@ public void onStatusChange(Paragraph p, Status before, Status after) { if (p.isTerminated()) { if (p.getStatus() == Status.FINISHED) { -LOG.info("Job {} is finished successfully, status: {}", p.getId(), p.getStatus()); +LOG.info("Note {}, job {} is finished successfully, status: {}", +p.getNote().getId(), p.getId(), p.getStatus()); } else { -LOG.warn("Job {} is finished, status: {}, exception: {}, result: {}", p.getId(), -p.getStatus(), p.getException(), p.getReturn()); +LOG.warn("Note {}. job {} is finished, status: {}, exception: {}, " ++ "result\n@ Result start @\n{}\n@ Result end @", +p.getNote().getId(), p.getId(), p.getStatus(), p.getException(), p.getReturn()); } try { diff --git a/zeppelin-web/src/app/notebook/notebook-actionBar.html b/zeppelin-web/src/app/notebook/notebook-actionBar.html index 668697bdcb..0afc448626 100644 --- a/zeppelin-web/src/app/notebook/notebook-actionBar.html +++ b/zeppelin-web/src/app/notebook/notebook-actionBar.html @@ -30,22 +30,25 @@ - + @@ -53,13 +56,22 @@ + + + ng-disabled="revisionView"> + + + + + + diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js b/zeppelin-web/src/app/notebook/notebook.controller.js index 426667d6c9..753c75f374 100644 --- a/zeppelin-web/src/app/notebook/notebook.controller.js +++ b/zeppelin-web/src/app/notebook/notebook.controller.js @@ -32,6 +32,7 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope, $scope.disableForms = false; $scope.editorToggled = false; $scope.tableToggled = false; + $scope.isEnableRunToggled = true; $scope.viewOnly = false; $scope.showSetting = false; $scope.showRevisionsComparator = false; @@ -39,6 +40,7 @@ function NotebookCtrl($scope, $route, $routeParams, $location, $rootScope, $scope.collaborativeModeUsers = []; $scope.looknfeelOption = ['default', 'simple', 'report']; $scope.noteFormTitle = null; + $scope.
[GitHub] liuxunorg commented on a change in pull request #3271: [ZEPPELIN-3919] Paragraph config default value can be customized
liuxunorg commented on a change in pull request #3271: [ZEPPELIN-3919] Paragraph config default value can be customized URL: https://github.com/apache/zeppelin/pull/3271#discussion_r244011908 ## File path: zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NotebookTest.java ## @@ -1082,6 +1083,50 @@ public void testAuthorizationRoles() throws IOException { assertEquals(user2Notes.get(0).getId(), note.getId()); } + @Test + public void testInterpreterSettingConfig() { Review comment: Added test case. Can check the configuration changes after the interpreter type changes. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liuxunorg commented on a change in pull request #3271: [ZEPPELIN-3919] Paragraph config default value can be customized
liuxunorg commented on a change in pull request #3271: [ZEPPELIN-3919] Paragraph config default value can be customized URL: https://github.com/apache/zeppelin/pull/3271#discussion_r244012111 ## File path: zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java ## @@ -569,6 +593,45 @@ public void setConfig(Map config) { this.config = config; } + // apply the `interpreter-setting.json` config + // When creating a paragraph, it will update some of the configuration + // parameters of the paragraph from the web side. + // Need to deal with 2 situations + // 1. The interpreter does not have a config configuration set, + //so newConfig is equal to null, Need to be processed using the + //default parameters of the interpreter + // 2. The user manually modified the interpreter types of this paragraph. + //Need to delete the existing configuration of this paragraph, + //update with the specified interpreter configuration + public void applyConfigSetting(Map newConfig) { Review comment: Added test case. in NotebookTest::testInterpreterSettingConfig() This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liuxunorg commented on a change in pull request #3271: [ZEPPELIN-3919] Paragraph config default value can be customized
liuxunorg commented on a change in pull request #3271: [ZEPPELIN-3919] Paragraph config default value can be customized URL: https://github.com/apache/zeppelin/pull/3271#discussion_r244012227 ## File path: zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSettingManager.java ## @@ -401,6 +401,7 @@ private void registerInterpreterSetting(List registeredIn InterpreterInfo interpreterInfo = new InterpreterInfo(registeredInterpreter.getClassName(), registeredInterpreter.getName(), registeredInterpreter.isDefaultInterpreter(), registeredInterpreter.getEditor()); + interpreterInfo.setConfig(registeredInterpreter.getConfig()); Review comment: done. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liuxunorg commented on a change in pull request #3271: [ZEPPELIN-3919] Paragraph config default value can be customized
liuxunorg commented on a change in pull request #3271: [ZEPPELIN-3919] Paragraph config default value can be customized URL: https://github.com/apache/zeppelin/pull/3271#discussion_r244012658 ## File path: zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java ## @@ -450,6 +463,24 @@ protected InterpreterResult jobRun() throws Throwable { p.settings.setParams(settings.getParams()); } + // After the paragraph is executed, + // need to apply the paragraph to the configuration in the + // `interpreter-setting.json` config + if (this.configSettingNeedUpdate) { Review comment: The default configuration is used when the `intpText` changes. The configuration modified by the user on the paragraph is not overwritten by the interpreter default configuration. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jongyoul commented on a change in pull request #3272: [ZEPPELIN-3422] Add JMX Support
jongyoul commented on a change in pull request #3272: [ZEPPELIN-3422] Add JMX Support URL: https://github.com/apache/zeppelin/pull/3272#discussion_r244071781 ## File path: zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java ## @@ -177,6 +183,51 @@ public void contextDestroyed(ServletContextEvent servletContextEvent) {} // Notebook server setupNotebookServer(webApp, conf, sharedServiceLocator); +// JMX Enable +Stream.of("ZEPPELIN_JMX_ENABLE") Review comment: :-) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liuxunorg commented on issue #3271: [ZEPPELIN-3919] Paragraph config default value can be customized
liuxunorg commented on issue #3271: [ZEPPELIN-3919] Paragraph config default value can be customized URL: https://github.com/apache/zeppelin/pull/3271#issuecomment-450069954 @zjffdu, @felixcheung , @jongyoul , Please help me review code. Thanks! :-) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liuxunorg commented on issue #3273: [ZEPPELIN-3920] Paragraph support custom menu display with multiple URL link
liuxunorg commented on issue #3273: [ZEPPELIN-3920] Paragraph support custom menu display with multiple URL link URL: https://github.com/apache/zeppelin/pull/3273#issuecomment-450070124 @zjffdu , @felixcheung , @jongyoul , Please help me review code. Thanks! :-) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] felixcheung commented on a change in pull request #3273: [ZEPPELIN-3920] Paragraph support custom menu display with multiple URL link
felixcheung commented on a change in pull request #3273: [ZEPPELIN-3920] Paragraph support custom menu display with multiple URL link URL: https://github.com/apache/zeppelin/pull/3273#discussion_r244082473 ## File path: zeppelin-web/src/app/notebook/paragraph/paragraph-control.html ## @@ -54,20 +55,6 @@ ng-click="cancelParagraph(paragraph)" ng-class="{'item-disable' : isNoteRunning}" ng-show="paragraph.status=='RUNNING' || paragraph.status=='PENDING'"> - - Spark job - - -Spark Jobs - - - -Jobs #{{$index}} - - Review comment: how is this getting shown now? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] cypark1 opened a new pull request #3275: Test123
cypark1 opened a new pull request #3275: Test123 URL: https://github.com/apache/zeppelin/pull/3275 hello test This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] cypark1 closed pull request #3275: Test123
cypark1 closed pull request #3275: Test123 URL: https://github.com/apache/zeppelin/pull/3275 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/text.ttt b/text.ttt new file mode 100644 index 00..4399a77eed --- /dev/null +++ b/text.ttt @@ -0,0 +1 @@ +232323fefef This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liuxunorg commented on a change in pull request #3273: [ZEPPELIN-3920] Paragraph support custom menu display with multiple URL link
liuxunorg commented on a change in pull request #3273: [ZEPPELIN-3920] Paragraph support custom menu display with multiple URL link URL: https://github.com/apache/zeppelin/pull/3273#discussion_r244084337 ## File path: zeppelin-web/src/app/notebook/paragraph/paragraph-control.html ## @@ -54,20 +55,6 @@ ng-click="cancelParagraph(paragraph)" ng-class="{'item-disable' : isNoteRunning}" ng-show="paragraph.status=='RUNNING' || paragraph.status=='PENDING'"> - - Spark job - - -Spark Jobs - - - -Jobs #{{$index}} - - Review comment: This code that I cleaned up, It is an extra invalid code that has always existed. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[jira] [Created] (ZEPPELIN-3926) Drill down for record count
Pradeep created ZEPPELIN-3926: - Summary: Drill down for record count Key: ZEPPELIN-3926 URL: https://issues.apache.org/jira/browse/ZEPPELIN-3926 Project: Zeppelin Issue Type: New Feature Environment: RHEL 6 Reporter: Pradeep Attachments: zeppelinScreenshot.PNG I am planning to use apache zeppelin with Postgresql 9.5. My sql query and data is below. I want all the records to open when I click on the numbers. How to achieve that. Lets say when I click on count 2 i.e in the first row, I want zeppelin to open a window with those two records.. Can any one guide me how to achieve that? {code:java} // code placeholder {code} %pgsql SELECT final_result.acivity_name as ActivityName,jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec FROM crosstab($$SELECT acivity_name as ActivityName,to_char(activity_start_date,'MON') as MON, count(acivity_name) as ActvityCount FROM public.activity_details group by 1,2,activity_start_date order by 1,2,activity_start_date $$,$$VALUES ('JAN'::text), ('FEB'), ('MAR'), ('APR'), ('MAY'), ('JUN') , ('JUL'), ('AUG'), ('SEP'), ('OCT'), ('NOV'), ('DEC')$$) AS final_result(Acivity_name character varying(100), Jan bigint,Feb bigint,Mar bigint,Apr bigint, May bigint,Jun bigint,Jul bigint,Aug bigint, Sep bigint,Oct bigint,Nov bigint,Dec bigint) UNION ALL SELECT 'SubTotal' as Grand,sum(jan), sum(feb), sum(mar), sum(apr), sum(may), sum(jun), sum(jul), sum(aug), sum(sep), sum(oct), sum(nov), sum(dec) FROM crosstab($$SELECT acivity_name as ActivityName,to_char(activity_start_date,'MON') as MON, count(acivity_name) as ActvityCount FROM public.activity_details group by 1,2,activity_start_date order by 1,2,activity_start_date $$,$$VALUES ('JAN'::text), ('FEB'), ('MAR'), ('APR'), ('MAY'), ('JUN') , ('JUL'), ('AUG'), ('SEP'), ('OCT'), ('NOV'), ('DEC')$$) AS final_result(Acivity_name character varying(100), Jan bigint,Feb bigint,Mar bigint,Apr bigint, May bigint,Jun bigint,Jul bigint,Aug bigint, Sep bigint,Oct bigint,Nov bigint,Dec bigint) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] jongyoul commented on issue #3272: [ZEPPELIN-3422] Add JMX Support
jongyoul commented on issue #3272: [ZEPPELIN-3422] Add JMX Support URL: https://github.com/apache/zeppelin/pull/3272#issuecomment-450090170 CI passed. https://travis-ci.org/jongyoul/zeppelin/builds/472518267 Will merge it This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services