mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Clean outputs when users turn off personalized mode
This commit is contained in:
parent
a190f2f23c
commit
47c978f546
2 changed files with 13 additions and 0 deletions
|
|
@ -137,6 +137,15 @@ public class Note implements Serializable, ParagraphJobListener {
|
|||
valueString = "false";
|
||||
}
|
||||
getConfig().put("personalizedMode", valueString);
|
||||
clearUserParagraphs(value);
|
||||
}
|
||||
|
||||
private void clearUserParagraphs(boolean isPersonalized) {
|
||||
if (!isPersonalized) {
|
||||
for (Paragraph p : paragraphs) {
|
||||
p.clearUserParagraphs();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
|
|
|
|||
|
|
@ -149,6 +149,10 @@ public class Paragraph extends Job implements Serializable, Cloneable {
|
|||
return p;
|
||||
}
|
||||
|
||||
public void clearUserParagraphs() {
|
||||
userParagraphMap.clear();
|
||||
}
|
||||
|
||||
public void addUser(Paragraph p, String user) {
|
||||
userParagraphMap.put(user, p);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue