Author: challngr
Date: Thu Nov 5 19:23:05 2015
New Revision: 1712850
URL: http://svn.apache.org/viewvc?rev=1712850&view=rev
Log:
UIMA-4755 Scripting and build updates.
Added:
uima/sandbox/uima-ducc/trunk/src/main/admin/db_create (with props)
uima/sandbox/uima-ducc/trunk/src/main/admin/db_util.py
uima/sandbox/uima-ducc/trunk/src/main/resources/cassandra.yaml (with
props)
Removed:
uima/sandbox/uima-ducc/trunk/src/main/resources/cassandra.yaml.prep
uima/sandbox/uima-ducc/trunk/src/main/resources/private/database.xml
Modified:
uima/sandbox/uima-ducc/trunk/src/main/admin/check_ducc
uima/sandbox/uima-ducc/trunk/src/main/admin/db_loader
uima/sandbox/uima-ducc/trunk/src/main/admin/ducc.py
uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_post_install
uima/sandbox/uima-ducc/trunk/src/main/admin/ducc_util.py
uima/sandbox/uima-ducc/trunk/src/main/assembly/bin.xml
uima/sandbox/uima-ducc/trunk/src/main/resources/cassandra-env.sh
uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/persistence/rm/IRmPersistence.java
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/DbAlive.java
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/DbCreate.java
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/DbLoader.java
uima/sandbox/uima-ducc/trunk/uima-ducc-database/src/main/java/org/apache/uima/ducc/database/RmStatePersistence.java
uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/NodePool.java
Modified: uima/sandbox/uima-ducc/trunk/src/main/admin/check_ducc
URL:
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/admin/check_ducc?rev=1712850&r1=1712849&r2=1712850&view=diff
==
--- uima/sandbox/uima-ducc/trunk/src/main/admin/check_ducc (original)
+++ uima/sandbox/uima-ducc/trunk/src/main/admin/check_ducc Thu Nov 5 19:23:05
2015
@@ -55,7 +55,7 @@ class CheckDucc(DuccUtil):
if ( self.db_bypass == True ):
return True
-ret = self.db_alive()
+ret = self.db_alive(3)
if ( ret ):
print 'The database is running'
else:
Added: uima/sandbox/uima-ducc/trunk/src/main/admin/db_create
URL:
http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/admin/db_create?rev=1712850&view=auto
==
--- uima/sandbox/uima-ducc/trunk/src/main/admin/db_create (added)
+++ uima/sandbox/uima-ducc/trunk/src/main/admin/db_create Thu Nov 5 19:23:05
2015
@@ -0,0 +1,110 @@
+#!/usr/bin/env python
+# ---
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ---
+
+
+import os
+import sys
+import getopt
+
+import shutil
+import subprocess
+from stat import *
+
+from ducc_util import DuccUtil
+
+
+from ducc_base import Properties
+from ducc_base import Property
+
+from ducc_base import find_ducc_home
+from ducc_base import find_localhost
+
+from ducc import Ducc
+
+import db_util as dbu
+
+#
+# Create and initialize the DUCC database. In a new installation this is
handled by
+# ducc_post_install. Older installations need to run db_create as one of the
steps
+# of migration to the DB.
+#
+class DbCreate(DuccUtil):
+
+def usage(self, msg):
+
+if ( msg != None ):
+print ' '.join(msg)
+
+
+print 'DbCreate configures the database and installs the schema.'
+print ''
+print "Usage:"
+print " db_create [options]"
+print "If no options prompts are given for expected
parameters."
+print ""
+print "Options:"
+print " [-n, --head-node] "
+print "This is the name of the host that will run the DUCC
management processes."
+print ""
+print " [-, --db-password] "
+print "This is the password DUCC uses to manage the database."