Commit graph

23 commits

Author SHA1 Message Date
eunhwa99
85b75502e9
[ZEPPELIN-6306] Prevent NPE in StaticRepl by fail-fast JavaCompiler check
### What is this PR for?
- ToolProvider.getSystemJavaCompiler() can return null in JRE environments.
- Added a fail-fast null check in StaticRepl to throw a clear exception early.
- Updated unit test to reflect this behavior.

### What type of PR is it?
Bug Fix

### Todos
* [ ] - Task

### What is the Jira issue?
* [ZEPPELIN-6306](https://issues.apache.org/jira/browse/ZEPPELIN-6306)

### How should this be tested?
*  Run the existing unit test `testJDKCompilerAvailability()` to ensure the compiler is available in JDK.
* Run all Zeppelin unit tests to confirm no regressions.
### Screenshots (if appropriate)

### Questions:
* Does the license files need to update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no


Closes #5069 from eunhwa99/ZEPPELIN-6306.

Signed-off-by: ParkGyeongTae <gyeongtae@apache.org>
2025-09-07 17:37:36 +09:00
eunhwa99
f45587db39
[ZEPPELIN-6299] Refactor StaticRepl for readability, correctness, and modern Java usage
### What is this PR for?
This PR refactors the `StaticRepl` class to improve readability, maintainability, and align with modern Java best practices.  
There are no functional changes.  

- Generic type refinement with diamond operator in loop:  Adds type safety by explicitly specifying the generic type. Prevents unchecked warnings and makes the code clearer to readers and tools.
- Replace `Arrays.asList` to `List.of` :  List.of (Java 9+) produces an immutable list, which is safer and better communicates the intent that the list will not be modified. It avoids side effects of Arrays.asList, which is fixed-size and backed by the original array.
- Minor typos fixed: Corrected spelling mistakes and adjusted comments.
-  Removes redundant boolean comparison to follow standard Java coding conventions.
- Replace index-based loop with enhanced for-each to eliminate boilerplate index management, improves readability, and reduces chances of off-by-one errors. It makes the intent ("iterate all elements") clearer.
- Variable declaration moved closer to usage to improve code locality and readability by reducing variable scope. This makes the code easier to maintain and follow.

### What type of PR is it?
Refactoring

### Todos
* [ ] - Task

### What is the Jira issue?
* [ZEPPELIN-6299](https://issues.apache.org/jira/browse/ZEPPELIN-6299)  

### How should this be tested?
* Run existing unit tests to confirm behavior remains unchanged.  

### Screenshots (if appropriate)

### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No


Closes #5048 from eunhwa99/ZEPPELIN-6299.

Signed-off-by: ParkGyeongTae <gyeongtae@apache.org>
2025-09-05 14:40:13 +09:00
Jongyoul Lee
1b90f318a3
[MINOR] Bump up version to 0.13.0-SNAPSHOT
### What is this PR for?
Change the version to 0.13.0-SNAPSHOT

### What type of PR is it?
Improvement

### Todos
* [x] - Change versions to 0.13.0-SNAPSHOT

### How should this be tested?
The version should show 0.13.0-SNAPSHOT when building it.

### Screenshots (if appropriate)

### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No


Closes #4995 from jongyoul/minor/bump-up-0.13.0-snapshot.

Signed-off-by: Jongyoul Lee <jongyoul@gmail.com>
2025-08-02 22:05:06 +09:00
Philipp Dallig
ea0802d24b
[ZEPPELIN-6138] Update Apache Parent
### What is this PR for?
This pull request updates the Apache parent version. We benefit significantly from plugin updates and can clean up our own `pom.xml`.

plugin updates:
maven-antrun-plugin - 1.8 -> 3.1.0
maven-assembly-plugin - 3.7.1 -> 3.7.1
maven-clean-plugin - 3.1.0 -> 3.4.0
maven-compiler-plugin - 3.8.1 -> 3.13.0
maven-dependency-plugin - 3.1.2 -> 3.7.1
maven-deploy-plugin - 2.8.2 -> 3.1.2
maven-enforcer-plugin - 3.0.0-M3 -> 3.5.0
maven-gpg-plugin - 1.6 -> 3.2.4
apache-rat-plugin - 0.13 -> 0.16.1
surefire & failsafe version - 3.2.2 -> 3.3.0

### What type of PR is it?
Improvement

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-6138

### How should this be tested?
* CI

### Questions:
* Does the license files need to update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No


Closes #4884 from Reamer/apacheParent.

Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>
2024-10-28 09:55:10 +01:00
Gyeongtae Park
32f2a8e67b
[ZEPPELIN-6038] Unification of the Logger variable (#4793)
* [ZEPPELIN-6038] Unify the Logger variable to LOGGER in all files

* [ZEPPELIN-6038] Set all logger constants to private static final

* [ZEPPELIN-6038] Adjust code character length

* [ZEPPELIN-6038] Refactor logger variable

* [ZEPPELIN-6038] Revert code for automatically generated files

* [ZEPPELIN-6038] Fix code syntax
2024-08-26 19:48:26 +02:00
PJ Fanning
207d47f431
[MINOR] Set Snapshot version to 0.12.0-SNAPSHOT (#4720)
* change version to 0.11.1-SNAPSHOT

* change version

* change to 0.12.0-SNAPSHOT
2024-02-21 10:58:13 +09:00
Philipp Dallig
11f6aa6f29
[ZEPPELIN-5848] Junit5 Migration (#4641)
* Migrate zeppelin-interpreter-integration

* migrate hbase

* migrate java

* migrate jdbc

* migrate kotlin interpreter

* Migrate python interpreter

* migrate rlang

* migrate zeppelin-jupyter-interpreter

* migrate zeppelin-jupyter

* migrate spark-interpreter

* Migrate file interpreter

* Delete empty flink test

* Migrate zeppelin-integration

* Remove junit-vintage-engine where it's not needed

* Add vintage engine for flink

* migrate flink partially to junit5

* Update license
2023-09-14 12:37:28 +02:00
Thai Tran
efc5fb8fb1
[ZEPPELIN-5884] fix: wrong path of test folder in Java Interpreter (#4569) 2023-02-24 18:49:24 +01:00
Philipp Dallig
2731527c0d
[ZEPPELIN-5824] Checkstyle (#4466) 2022-09-30 19:09:10 +09:00
Philipp Dallig
37630f2e4e
[ZEPPELIN-5522] Remove unnecessary maven-dependency-plugin maven plugin calls
### What is this PR for?
This PR removes unnecessary maven-dependency-plugin maven plugin calls

### What type of PR is it?
 - Refactoring

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-5522

### How should this be tested?
* CI

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Philipp Dallig <philipp.dallig@gmail.com>

Closes #4224 from Reamer/maven-dependency-plugin and squashes the following commits:

1a73f4f29 [Philipp Dallig] Remove maven-dependency-plugin from zeppelin-distribution
aa5d203d9 [Philipp Dallig] Remove maven-dependency-plugin from zeppelin-interpreter-parent
ff562e246 [Philipp Dallig] Remove plugin maven-dependency-plugin, which is skipped by default in zeppelin-interpreter-parent
43ee00ca7 [Philipp Dallig] Skip maven-dependency-plugin copy-plugin-dependencies for k8s-standard
2021-09-17 11:44:10 +02:00
Jongyoul Lee
5dd5a6584b [MINOR] Version up to 0.11.0-SNAPSHOT
### What is this PR for?
Version up to the next version of 0.11.0-SNAPSHOT

Author: Jongyoul Lee <jongyoul@gmail.com>

Closes #4221 from jongyoul/minor-version-up and squashes the following commits:

c38c9910a [Jongyoul Lee] Version up to the latest stable version
a962b08ec [Jongyoul Lee] [MINOR] Version up to 0.11.0-SNAPSHOT
2021-09-14 18:31:39 +09:00
cuspymd
919f030a8a [ZEPPELIN-5370] Polish pom.xml files
### What is this PR for?
Polish pom.xml files
- Delete unnecessary tags
- Delete duplicated dependencies

### What type of PR is it?
[Refactoring]

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-5370

### How should this be tested?
* CI

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: cuspymd <cuspymd@gmail.com>

Closes #4118 from cuspymd/polish-poms and squashes the following commits:

766278338 [cuspymd] Fix integration test error
385fcf2fd [cuspymd] Delete duplicated version of sub-modules
ba127bf16 [cuspymd] Recover duplicated dependencies related to spark interpreter
6fa7e1d51 [cuspymd] Polish pom.xml
2021-07-07 14:59:21 +02:00
Jeff Zhang
a89ba61fae [minor] update version in pom 2020-12-25 11:43:04 +08:00
Philipp Dallig
fbea3e0858 [ZEPPELIN-5044] Refactoring some viewed classes
### What is this PR for?
During development, I came across code that did not conform to current best practices.
For example:
  - Logging
    - [Anti-Pattern-1](https://rolf-engelhard.de/2013/03/logging-anti-patterns-part-i/), [Anti-Pattern-2](https://rolf-engelhard.de/2013/04/logging-anti-patterns-part-ii/), [Anti-Pattern-3](https://rolf-engelhard.de/2013/10/logging-anti-patterns-part-iii/)
  - [try-with-resources](https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html)

### What type of PR is it?
Refactoring

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-5044

### How should this be tested?
* Travis CI: https://travis-ci.org/github/Reamer/zeppelin/builds/727295209

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Philipp Dallig <philipp.dallig@gmail.com>

Closes #3909 from Reamer/refactoring and squashes the following commits:

dcf0417db [Philipp Dallig] Refactoring some viewed classes
2020-09-17 08:57:00 +02:00
Prabhjyot Singh
7d83d77886
[ZEPPELIN-4244] Intellij shows URI not regietered error for xmlns urls
This issue is based out of comment https://github.com/apache/zeppelin/pull/3370#issuecomment-511281165, where Injellij shows unknown error.

[Improvement]

* [ZEPPELIN-4244](https://issues.apache.org/jira/browse/ZEPPELIN-4244)

* CI should be green
* Intellij IDE should not show any error

* Does the licenses files need update? N/A
* Is there breaking changes for older versions? N/A
* Does this needs documentation? N/A

Author: Prabhjyot Singh <prabhjyot.singh@cloudera.com>

Closes #3409 from prabhjyotsingh/ZEPPELIN-4244 and squashes the following commits:

840ef118b [Prabhjyot Singh] ZEPPELIN-4244: Intellij shows URI not regietered error for xmlns urls

Change-Id: I88afbbb79967648f2932d33524e68fb2c5670006
2019-07-19 14:31:44 +05:30
Prabhjyot
70b4ec84f5
ZEPPELIN-4168: Use secure URLs for Maven repositories (#3370)
* ZEPPELIN-4168: Use secure URLs for Maven repositories

Change-Id: I229ae6a6ca3e6582d872a99c17bf02ddf99e6131

* fix rat check

Change-Id: Ie2037edb1323664c812ef3808a4fbb0ee538c184

* fix Travis builds

Change-Id: I2b3b4180e91013c5041a5c6d0641a26e7f890baa

* update license

Change-Id: Icc6500b387b62004fb3162f6f627ee4b7811bdcb
2019-05-27 14:55:38 +05:30
Patrice Clement
1d10625598 ZEPPELIN-3880: Code refactoring: remove class files using a Java stream
### What is this PR for?
Make use of a Java stream instead of an ugly for-loop to get rid of class files.

### What type of PR is it?
Improvement

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-3880

### How should this be tested?
* CI pass.

### Questions:
* Does the licenses files need update? No.
* Is there breaking changes for older versions? No.
* Does this needs documentation? No.

Author: Patrice Clement <monsieurp@gentoo.org>

Closes #3241 from monsieurp/ZEPPELIN-3880 and squashes the following commits:

e174285e8 [Patrice Clement] ZEPPELIN-3880: Code refactoring: remove class files using a Java stream
2019-01-30 15:36:41 +08:00
Jeff Zhang
5507015085 ZEPPELIN-3790. Move common interpreter dependencies into zeppelin-interpreter-parent
### What is this PR for?

This is refactoring PR which move common dependencies into zeppelin-interpreter-parent

### What type of PR is it?
[Refactoring]

### Todos
* [ ] - Task

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-3790

### How should this be tested?
* Ci pass

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang <zjffdu@apache.org>

Closes #3194 from zjffdu/ZEPPELIN-3790 and squashes the following commits:

0b34645a0 [Jeff Zhang] move junit to zeppelin-interpreter-parent
e4baa595e [Jeff Zhang] ZEPPELIN-3790. Move common interpreter dependencies into zeppelin-interpreter-parent
2018-10-01 08:58:05 +08:00
Jeff Zhang
0910e7f5b7 ZEPPELIN-3774. Rename module interpreter-parent to zeppelin-interpreter-parent
### What is this PR for?
Trivial PR for module name refactoring.

### What type of PR is it?
[Refactoring]

### Todos
* [ ] - Task

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-3774

### How should this be tested?
* CI pass

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang <zjffdu@apache.org>

Closes #3175 from zjffdu/ZEPPELIN-3774 and squashes the following commits:

ea72df9e5 [Jeff Zhang] ZEPPELIN-3774. Rename module interpreter-parent to zeppelin-interpreter-parent
2018-09-11 15:47:17 +08:00
Jeff Zhang
39041bf3d7 ZEPPELIN-3689. Shade all dependencies of zeppelin-interpreter
### What is this PR for?
This PR introduce new module zeppelin-interpreter-api which will shade all dependencies of zeppelin-interpreter, this is just to avoid the conflict with the custom interpreter implementation which may use jars that conflicts with dependency of zeppelin-interpreter.

### What type of PR is it?
[ Improvement]

### Todos
* [ ] - Task

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-3689

### How should this be tested?
* CI pass

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang <zjffdu@apache.org>

Closes #3170 from zjffdu/ZEPPELIN-3689 and squashes the following commits:

f3f210aee [Jeff Zhang] ZEPPELIN-3689. Shade all dependencies of zeppelin-interpreter
2018-09-10 15:35:18 +08:00
Jongyoul Lee
0d746fa2e2 Revert "[ZEPPELIN-3740] Adopt google-java-format and fmt-maven-plugin"
This reverts commit 55f6c91cab.
2018-08-29 19:05:55 +09:00
Jongyoul Lee
55f6c91cab [ZEPPELIN-3740] Adopt google-java-format and fmt-maven-plugin
### What is this PR for?
Avoiding outdated checkstyle error.

To check format
`mvn validate`

To fix non-complying files
`mvn fmt:format`

### What type of PR is it?
[Improvement | Refactoring]

### Todos
* [x] - Adopt `fmt-maven-plugin`

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-3740

### How should this be tested?
CI passs

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? Yes for contributors

Author: Jongyoul Lee <jongyoul@gmail.com>

Closes #3158 from jongyoul/ZEPPELIN-3740 and squashes the following commits:

f06c50e90 [Jongyoul Lee] Adopt `fmt-maven-plugin` for google-java-format Adopt all files
2018-08-26 13:43:14 +09:00
Vincenzo Selvaggio
ac2e957e2d [ZEPPELIN-3653] - New Java interpreter
### What is this PR for?
**New Java interpreter**
There are several Java libraries that could be used to leverage the Data Visualization & Collaboration features of Zeppelin hence the need of a Java interpreter to run any java code / library with no further dependencies.
Dependencies to any java library can be added by the end users in the Java Zeppelin interpreter Dependencies settings section.

### What type of PR is it?
* Feature

### Todos
* Any feedback from reviewers

### What is the Jira issue?
* [ZEPPELIN-3653]

### How should this be tested?
Manually
* Start the Zeppelin server
* Create a new note with the java interpreter binding
* Write some java code as per documentation (docs/interpreter/java.md)
Unit tests
* Run unit tests (JavaInterpreterTest.java and JavaInterpreterUtilsTest.java)

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update?
No, the dependency on com.thoughtworks.qdox was already added as part of the Beam Interpreter.
* Is there breaking changes for older versions?
No.
* Does this needs documentation?
Yes, it has been added to the PR, see docs/interpreter/java.md.

Author: Vincenzo Selvaggio <vselvaggio@hotmail.it>

Closes #3092 from selvinsource/java-interpreter and squashes the following commits:

c5f96b27d [Vincenzo Selvaggio] Excluding java interpreter from zeppelin-server tests.
3f85f1cd3 [Vincenzo Selvaggio] Removed redundant java profile as result of rebasing.
b68634034 [Vincenzo Selvaggio] Updated documentation for Java interpreter to be more explicit on the limitations.
ce9401079 [Vincenzo Selvaggio] Updated Java Interpreter README and documentation.
9e9a859e9 [Vincenzo Selvaggio] Stylecheck fixes.
706aa0795 [Vincenzo Selvaggio] PR reviews changes: -updated interpreter list -direct import of java module and update related README -static logger for Java interpreter
d2358f5dc [Vincenzo Selvaggio] Updated documentation for Java interpreter by adding relevant examples.
b57f1cfd0 [Vincenzo Selvaggio] Added Java Interpreter Utils and tests for them.
f542a4f61 [Vincenzo Selvaggio] Java Interpreter first version
2018-08-03 09:15:19 +08:00