add AsterixHyracksIntegrationUtil.run

Change-Id: I4d71e93a4c67ec18aa402adf4d6948618a177a68
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1087
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java
index 3dbc310..4b00195 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/common/AsterixHyracksIntegrationUtil.java
@@ -214,6 +214,10 @@
      */
     public static void main(String[] args) {
         AsterixHyracksIntegrationUtil integrationUtil = new AsterixHyracksIntegrationUtil();
+        run(integrationUtil);
+    }
+
+    protected static void run(final AsterixHyracksIntegrationUtil integrationUtil) {
         Runtime.getRuntime().addShutdownHook(new Thread() {
             @Override
             public void run() {