This is an automated email from the ASF dual-hosted git repository.
madhan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new a097bed ATLAS-3278: suggestions is not working for existing Atlas
instances
a097bed is described below
commit a097bed3f927d040cbdc9327511b8b1c5d9c7a9b
Author: skoritala <[email protected]>
AuthorDate: Thu Jun 13 10:46:23 2019 -0700
ATLAS-3278: suggestions is not working for existing Atlas instances
Signed-off-by: Madhan Neethiraj <[email protected]>
---
.../atlas/repository/patches/AtlasPatchManager.java | 3 ++-
.../repository/patches/FreeTextRequestHandlerPatch.java | 4 ++++
...erPatch.java => SuggestionsRequestHandlerPatch.java} | 17 +++++++++++------
3 files changed, 17 insertions(+), 7 deletions(-)
diff --git
a/repository/src/main/java/org/apache/atlas/repository/patches/AtlasPatchManager.java
b/repository/src/main/java/org/apache/atlas/repository/patches/AtlasPatchManager.java
index 567fcb2..093edf9 100644
---
a/repository/src/main/java/org/apache/atlas/repository/patches/AtlasPatchManager.java
+++
b/repository/src/main/java/org/apache/atlas/repository/patches/AtlasPatchManager.java
@@ -52,7 +52,8 @@ public class AtlasPatchManager {
final AtlasPatchHandler handlers[] = {
new UniqueAttributePatch(context),
new ClassificationTextPatch(context),
- new FreeTextRequestHandlerPatch(context)
+ new FreeTextRequestHandlerPatch(context),
+ new SuggestionsRequestHandlerPatch(context)
};
try {
diff --git
a/repository/src/main/java/org/apache/atlas/repository/patches/FreeTextRequestHandlerPatch.java
b/repository/src/main/java/org/apache/atlas/repository/patches/FreeTextRequestHandlerPatch.java
index 7a6149f..11142a4 100644
---
a/repository/src/main/java/org/apache/atlas/repository/patches/FreeTextRequestHandlerPatch.java
+++
b/repository/src/main/java/org/apache/atlas/repository/patches/FreeTextRequestHandlerPatch.java
@@ -31,6 +31,10 @@ import java.util.Collection;
import static org.apache.atlas.model.patches.AtlasPatch.PatchStatus.APPLIED;
+/**
+ * This patch handler installs free text request handlers for already running
Atlas instances.
+ * --instances that were deployed with older versions.
+ */
public class FreeTextRequestHandlerPatch extends AtlasPatchHandler {
private static final Logger LOG =
LoggerFactory.getLogger(FreeTextRequestHandlerPatch.class);
diff --git
a/repository/src/main/java/org/apache/atlas/repository/patches/FreeTextRequestHandlerPatch.java
b/repository/src/main/java/org/apache/atlas/repository/patches/SuggestionsRequestHandlerPatch.java
similarity index 79%
copy from
repository/src/main/java/org/apache/atlas/repository/patches/FreeTextRequestHandlerPatch.java
copy to
repository/src/main/java/org/apache/atlas/repository/patches/SuggestionsRequestHandlerPatch.java
index 7a6149f..c0471a8 100644
---
a/repository/src/main/java/org/apache/atlas/repository/patches/FreeTextRequestHandlerPatch.java
+++
b/repository/src/main/java/org/apache/atlas/repository/patches/SuggestionsRequestHandlerPatch.java
@@ -31,15 +31,20 @@ import java.util.Collection;
import static org.apache.atlas.model.patches.AtlasPatch.PatchStatus.APPLIED;
-public class FreeTextRequestHandlerPatch extends AtlasPatchHandler {
- private static final Logger LOG =
LoggerFactory.getLogger(FreeTextRequestHandlerPatch.class);
- private static final String PATCH_ID = "JAVA_PATCH_0000_003";
- private static final String PATCH_DESCRIPTION = "Creates Solr request
handler for use in free-text searches";
+/**
+ * This patch handler installs suggestions request handlers for already
running Atlas instances.
+ * Basically, for instances that were deployed with older versions.
+ */
+public class SuggestionsRequestHandlerPatch extends AtlasPatchHandler {
+ private static final Logger LOG =
LoggerFactory.getLogger(SuggestionsRequestHandlerPatch.class);
+
+ private static final String PATCH_ID = "JAVA_PATCH_0000_004";
+ private static final String PATCH_DESCRIPTION = "Creates Solr request
handler for use in suggestions.";
private final PatchContext context;
- public FreeTextRequestHandlerPatch(PatchContext context) {
+ public SuggestionsRequestHandlerPatch(PatchContext context) {
super(context.getPatchRegistry(), PATCH_ID, PATCH_DESCRIPTION);
this.context = context;
@@ -59,6 +64,6 @@ public class FreeTextRequestHandlerPatch extends
AtlasPatchHandler {
setStatus(APPLIED);
- LOG.info("FreeTextRequestHandlerPatch.apply(): patchId={}, status={}",
getPatchId(), getStatus());
+ LOG.info("SuggestionsRequestHandlerPatch.apply(): patchId={},
status={}", getPatchId(), getStatus());
}
}