You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by zj...@apache.org on 2020/04/22 07:30:13 UTC
[zeppelin] branch master updated: [ZEPPELIN-4742]. Don't include
minus sign in paragraph id
This is an automated email from the ASF dual-hosted git repository.
zjffdu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/zeppelin.git
The following commit(s) were added to refs/heads/master by this push:
new 75ff1d3 [ZEPPELIN-4742]. Don't include minus sign in paragraph id
75ff1d3 is described below
commit 75ff1d39b0c38e596b2ac2990ab150530a8e37cd
Author: Jeff Zhang <zj...@apache.org>
AuthorDate: Sat Apr 11 12:01:29 2020 +0800
[ZEPPELIN-4742]. Don't include minus sign in paragraph id
### What is this PR for?
Trivial PR which just remove minus sign in paragraph id.
### What type of PR is it?
[ Improvement ]
### Todos
* [ ] - Task
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-4742
### 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 <zj...@apache.org>
Closes #3743 from zjffdu/ZEPPELIN-4742 and squashes the following commits:
8d025b391 [Jeff Zhang] [ZEPPELIN-4742]. Don't include minus sign in paragraph id
---
.../src/main/java/org/apache/zeppelin/notebook/Paragraph.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
index 096df6d..756db73 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Paragraph.java
@@ -136,7 +136,7 @@ public class Paragraph extends JobWithProgressPoller<InterpreterResult> implemen
}
private static String generateId() {
- return "paragraph_" + System.currentTimeMillis() + "_" + new SecureRandom().nextInt();
+ return "paragraph_" + System.currentTimeMillis() + "_" + Math.abs(new SecureRandom().nextInt());
}
public Map<String, Paragraph> getUserParagraphMap() {