falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sowmya...@apache.org
Subject falcon git commit: FALCON-1901: Fix intermittent IT test failures caused by extension co…
Date Thu, 14 Apr 2016 01:12:18 GMT
Repository: falcon
Updated Branches:
  refs/heads/master 6655e90a7 -> 2f2b816fe


FALCON-1901: Fix intermittent IT test failures caused by extension co…

Author: Sowmya Ramesh <sramesh@hortonworks.com>

Reviewers: Balu<bvellanki@hortonworks.com>, Ying Zheng<yzheng@hortonworks.com>

Closes #97 from sowmyaramesh/FALCON-1901


Project: http://git-wip-us.apache.org/repos/asf/falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/2f2b816f
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/2f2b816f
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/2f2b816f

Branch: refs/heads/master
Commit: 2f2b816febb3171509b8af80499ac18e4c060b44
Parents: 6655e90
Author: Sowmya Ramesh <sramesh@hortonworks.com>
Authored: Wed Apr 13 18:12:11 2016 -0700
Committer: Sowmya Ramesh <sramesh@hortonworks.com>
Committed: Wed Apr 13 18:12:11 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/falcon/extensions/ExtensionService.java     | 4 +---
 .../org/apache/falcon/service/SharedLibraryHostingService.java  | 5 +++++
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/2f2b816f/extensions/src/main/java/org/apache/falcon/extensions/ExtensionService.java
----------------------------------------------------------------------
diff --git a/extensions/src/main/java/org/apache/falcon/extensions/ExtensionService.java b/extensions/src/main/java/org/apache/falcon/extensions/ExtensionService.java
index ffed6ca..3b15598 100644
--- a/extensions/src/main/java/org/apache/falcon/extensions/ExtensionService.java
+++ b/extensions/src/main/java/org/apache/falcon/extensions/ExtensionService.java
@@ -26,8 +26,6 @@ import org.apache.falcon.service.FalconService;
  * Extension service.
  */
 public class ExtensionService implements FalconService {
-    private static ExtensionStore extensionStore = ExtensionStore.get();
-
     public static final String SERVICE_NAME = ExtensionService.class.getSimpleName();
 
     @Override
@@ -44,6 +42,6 @@ public class ExtensionService implements FalconService {
     }
 
     public static ExtensionStore getExtensionStore() {
-        return extensionStore;
+        return ExtensionStore.get();
     }
 }

http://git-wip-us.apache.org/repos/asf/falcon/blob/2f2b816f/oozie/src/main/java/org/apache/falcon/service/SharedLibraryHostingService.java
----------------------------------------------------------------------
diff --git a/oozie/src/main/java/org/apache/falcon/service/SharedLibraryHostingService.java
b/oozie/src/main/java/org/apache/falcon/service/SharedLibraryHostingService.java
index 815f5f7..b862111 100644
--- a/oozie/src/main/java/org/apache/falcon/service/SharedLibraryHostingService.java
+++ b/oozie/src/main/java/org/apache/falcon/service/SharedLibraryHostingService.java
@@ -30,6 +30,7 @@ import org.apache.falcon.entity.v0.cluster.Interfacetype;
 import org.apache.falcon.hadoop.HadoopClientFactory;
 import org.apache.falcon.util.StartupProperties;
 import org.apache.falcon.extensions.store.ExtensionStore;
+import org.apache.falcon.extensions.ExtensionService;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.FileUtil;
@@ -82,6 +83,10 @@ public class SharedLibraryHostingService implements ConfigurationChangeListener
 
     private void pushExtensionArtifactsToCluster(final Cluster cluster,
                                                  final FileSystem clusterFs) throws FalconException
{
+        if (!Services.get().isRegistered(ExtensionService.SERVICE_NAME)) {
+            LOG.info("ExtensionService not registered, return");
+            return;
+        }
 
         ExtensionStore store = ExtensionStore.get();
         if (!store.isExtensionStoreInitialized()) {


Mime
View raw message