airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: cleaning up airavata-server properties
Date Wed, 24 Feb 2016 15:30:42 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 3ac76fefc -> e303bb5f1


cleaning up airavata-server properties


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

Branch: refs/heads/develop
Commit: e303bb5f1931de285d1b5aa89c049f38069a5815
Parents: 3ac76fe
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Wed Feb 24 10:33:25 2016 -0500
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Wed Feb 24 10:33:25 2016 -0500

----------------------------------------------------------------------
 .../common/utils/ApplicationSettings.java       | 16 ----
 .../airavata/common/utils/ServerSettings.java   |  3 +-
 .../main/resources/airavata-server.properties   | 16 +---
 .../store/server/CredentialStoreServer.java     | 84 ++++++++++----------
 4 files changed, 44 insertions(+), 75 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/e303bb5f/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
b/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
index b521962..b6afb18 100644
--- a/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
+++ b/modules/commons/src/main/java/org/apache/airavata/common/utils/ApplicationSettings.java
@@ -351,18 +351,6 @@ public class ApplicationSettings {
         return getSetting("credential.store.keystore.url");
     }
 
-    public static String getCredentialStoreThriftServerKeyStorePath() throws ApplicationSettingsException
{
-        return getSetting("credential.store.thrift.server.keystore");
-    }
-
-    public static boolean isCredentialStoreStartEnabled() throws ApplicationSettingsException
{
-        String enableCredentialStore = getSetting("start.credential.store");
-        if (enableCredentialStore.equals("true")){
-            return true;
-        }
-        return false;
-    }
-
     public static String getCredentialStoreKeyAlias() throws ApplicationSettingsException
{
         return getSetting("credential.store.keystore.alias");
     }
@@ -371,10 +359,6 @@ public class ApplicationSettings {
         return getSetting("credential.store.keystore.password");
     }
 
-    public static String getCredentialStoreThriftServerKeyStorePassword() throws ApplicationSettingsException
{
-        return getSetting("credential.store.thrift.server.keystore.password");
-    }
-
     public static String getCredentialStoreServerHost() throws ApplicationSettingsException
{
         return getSetting("credential.store.server.host");
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/e303bb5f/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
----------------------------------------------------------------------
diff --git a/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
b/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
index becad00..c75e73e 100644
--- a/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
+++ b/modules/commons/src/main/java/org/apache/airavata/common/utils/ServerSettings.java
@@ -35,7 +35,6 @@ public class ServerSettings extends ApplicationSettings {
     private static final String DEFAULT_USER = "default.registry.user";
     private static final String DEFAULT_USER_PASSWORD = "default.registry.password";
     private static final String DEFAULT_USER_GATEWAY = "default.registry.gateway";
-    private static final String LOCAL_DATA_DIR = "local.data.dir";
 
     public static final String IP = "ip";
 
@@ -376,6 +375,6 @@ public class ServerSettings extends ApplicationSettings {
     }
 
     public static String getLocalDataLocation() {
-        return getSetting(LOCAL_DATA_DIR, System.getProperty("java.io.tmpdir"));
+        return System.getProperty("java.io.tmpdir");
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/e303bb5f/modules/configuration/server/src/main/resources/airavata-server.properties
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/airavata-server.properties b/modules/configuration/server/src/main/resources/airavata-server.properties
index 160f49d..0b7be61 100644
--- a/modules/configuration/server/src/main/resources/airavata-server.properties
+++ b/modules/configuration/server/src/main/resources/airavata-server.properties
@@ -48,10 +48,6 @@ default.registry.user=admin
 default.registry.password=admin
 default.registry.password.hash.method=SHA
 default.registry.gateway=php_reference_gateway
-# this is the path used to store intermediate data, this will be removed with third party
file transfer implementation.
-local.data.dir=/home/airavata/experimentData/
-
-#ip=127.0.0.1
 
 ###########################################################################
 #  Application Catalog DB Configuration
@@ -96,8 +92,6 @@ workflowcatalog.validationQuery=SELECT 1 from CONFIGURATION
 #  Server module Configuration
 ###########################################################################
 servers=apiserver,orchestrator,gfac,credentialstore
-#shutdown.trategy=NONE
-shutdown.trategy=SELF_TERMINATE
 
 
 ###########################################################################
@@ -124,9 +118,6 @@ orchestrator.server.name=orchestrator-node0
 orchestrator.server.host=localhost
 orchestrator.server.port=8940
 orchestrator.server.min.threads=50
-#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACEmbeddedJobSubmitter
-#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACPassiveJobSubmitter
-#job.submitter=org.apache.airavata.orchestrator.core.impl.GFACRPCJobSubmitter
 job.validators=org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator
 submitter.interval=10000
 threadpool.size=10
@@ -173,7 +164,6 @@ job.notification.flags=abe
 ###########################################################################
 # Credential Store module Configuration
 ###########################################################################
-start.credential.store=true
 credential.store.keystore.url=/Users/chathuri/dev/airavata/credential-store/oa4mp/airavata_sym.jks
 credential.store.keystore.alias=airavata
 credential.store.keystore.password=airavata
@@ -184,9 +174,8 @@ credential.store.jdbc.driver=org.apache.derby.jdbc.ClientDriver
 credential.store.server.host=localhost
 credential.store.server.port=8960
 credentialstore=org.apache.airavata.credential.store.server.CredentialStoreServer
-credential.store.thrift.server.keystore=/Users/chathuri/dev/airavata/credential-store/oa4mp/airavata.jks
-credential.store.thrift.server.keystore.password=airavata
 
+# these properties used by credential store email notifications
 email.server=smtp.googlemail.com
 email.server.port=465
 email.user=airavata
@@ -230,16 +219,15 @@ email.based.monitor.folder.name=INBOX
 email.based.monitor.store.protocol=imaps
 #These property will be used to query the email server periodically. value in milliseconds(ms).
 email.based.monitoring.period=10000
+
 ###########################################################################
 # AMQP Notification Configuration
 ###########################################################################
-#publisher
 #for simple scenarios we can use the guest user
 rabbitmq.broker.url=amqp://localhost:5672
 #for production scenarios, give url as amqp://userName:password@hostName:portNumber/virtualHost,
create user, virtualhost
 # and give permissions, refer: http://blog.dtzq.com/2012/06/rabbitmq-users-and-virtual-hosts.html
 #rabbitmq.broker.url=amqp://airavata:airavata@localhost:5672/messaging
-
 status.publisher=org.apache.airavata.messaging.core.impl.RabbitMQStatusPublisher
 task.launch.publisher=org.apache.airavata.messaging.core.impl.RabbitMQProcessLaunchPublisher
 rabbitmq.status.exchange.name=airavata_rabbitmq_exchange

http://git-wip-us.apache.org/repos/asf/airavata/blob/e303bb5f/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
----------------------------------------------------------------------
diff --git a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
index 694680f..2e3db05 100644
--- a/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
+++ b/modules/credential-store/credential-store-service/src/main/java/org/apache/airavata/credential/store/server/CredentialStoreServer.java
@@ -58,53 +58,51 @@ public class CredentialStoreServer  implements IServer {
 
     @Override
     public void start() throws Exception {
-        if(ServerSettings.isCredentialStoreStartEnabled()) {
-            try {
-                setStatus(ServerStatus.STARTING);
-	            final int serverPort = Integer.parseInt(ServerSettings.getCredentialStoreServerPort());
-	            final String serverHost = ServerSettings.getCredentialStoreServerHost();
-                CredentialStoreService.Processor processor = new CredentialStoreService.Processor(new
CredentialStoreServerHandler());
-
-                TServerTransport serverTransport;
-
-                if(serverHost == null){
-                    serverTransport = new TServerSocket(serverPort);
-                }else{
-                    InetSocketAddress inetSocketAddress = new InetSocketAddress(serverHost,
serverPort);
-                    serverTransport = new TServerSocket(inetSocketAddress);
+        try {
+            setStatus(ServerStatus.STARTING);
+            final int serverPort = Integer.parseInt(ServerSettings.getCredentialStoreServerPort());
+            final String serverHost = ServerSettings.getCredentialStoreServerHost();
+            CredentialStoreService.Processor processor = new CredentialStoreService.Processor(new
CredentialStoreServerHandler());
+
+            TServerTransport serverTransport;
+
+            if (serverHost == null) {
+                serverTransport = new TServerSocket(serverPort);
+            } else {
+                InetSocketAddress inetSocketAddress = new InetSocketAddress(serverHost, serverPort);
+                serverTransport = new TServerSocket(inetSocketAddress);
+            }
+            TThreadPoolServer.Args options = new TThreadPoolServer.Args(serverTransport);
+            options.minWorkerThreads = 30;
+            server = new TThreadPoolServer(options.processor(processor));
+
+            new Thread() {
+                public void run() {
+                    server.serve();
+                    setStatus(ServerStatus.STOPPED);
+                    logger.info("Credential store Server Stopped.");
                 }
-                TThreadPoolServer.Args options = new TThreadPoolServer.Args(serverTransport);
-                options.minWorkerThreads = 30;
-                server = new TThreadPoolServer(options.processor(processor));
-
-                new Thread() {
-                    public void run() {
-                        server.serve();
-                        setStatus(ServerStatus.STOPPED);
-                        logger.info("Credential store Server Stopped.");
-                    }
-                }.start();
-                new Thread() {
-                    public void run() {
-                        while(!server.isServing()){
-                            try {
-                                Thread.sleep(500);
-                            } catch (InterruptedException e) {
-                                break;
-                            }
-                        }
-                        if (server.isServing()){
-                            setStatus(ServerStatus.STARTED);
-                            logger.info("Starting Credential store Server on Port " + serverPort);
-                            logger.info("Listening to Credential store clients ....");
+            }.start();
+            new Thread() {
+                public void run() {
+                    while (!server.isServing()) {
+                        try {
+                            Thread.sleep(500);
+                        } catch (InterruptedException e) {
+                            break;
                         }
                     }
-                }.start();
-            } catch (TTransportException e) {
-                setStatus(ServerStatus.FAILED);
+                    if (server.isServing()) {
+                        setStatus(ServerStatus.STARTED);
+                        logger.info("Starting Credential store Server on Port " + serverPort);
+                        logger.info("Listening to Credential store clients ....");
+                    }
+                }
+            }.start();
+        } catch (TTransportException e) {
+            setStatus(ServerStatus.FAILED);
 //                logger.error("Error while starting the credential store service", e);
-                throw new Exception("Error while starting the credential store service",
e);
-            }
+            throw new Exception("Error while starting the credential store service", e);
         }
     }
 


Mime
View raw message