http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/cc_start/cc_start.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/cc_start/cc_start.sh b/asterixdb/asterix-events/src/main/resources/events/cc_start/cc_start.sh deleted file mode 100755 index 3950547..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/cc_start/cc_start.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env bash -#/* -# 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. - -if [ ! -d $LOG_DIR ]; -then - mkdir -p $LOG_DIR -fi -ccArgs='-client-listen-address '$CLIENT_NET_IP -ccArgs=$ccArgs' -client-listen-port '$CLIENT_NET_PORT -ccArgs=$ccArgs' -address '$CLUSTER_NET_IP -ccArgs=$ccArgs' -cluster-listen-port '$CLUSTER_NET_PORT -ccArgs=$ccArgs' -console-listen-port '$HTTP_PORT - -if [ ! -z $HEARTBEAT_PERIOD ] -then -ccArgs=$ccArgs' -heartbeat-period '$HEARTBEAT_PERIOD -fi - -if [ ! -z $MAX_HEARTBEAT_LAPSE_PERIODS ] -then -ccArgs=$ccArgs' -heartbeat-max-misses '$MAX_HEARTBEAT_LAPSE_PERIODS -fi - -if [ ! -z $PROFILE_DUMP_PERIOD ] -then -ccArgs=$ccArgs' -profile-dump-period '$PROFILE_DUMP_PERIOD -fi - -if [ ! -z $JOB_HISTORY_SIZE ] -then -ccArgs=$ccArgs' -job-history-size '$JOB_HISTORY_SIZE -fi - -if [ ! -z $RESULT_TIME_TO_LIVE ] -then -ccArgs=$ccArgs' -result-ttl '$RESULT_TIME_TO_LIVE -fi - -if [ ! -z $RESULT_SWEEP_THRESHOLD ] -then -ccArgs=$ccArgs' -result-sweep-threshold '$RESULT_SWEEP_THRESHOLD -fi - -if [ ! -z $CC_ROOT ] -then -ccArgs=$ccArgs' -root-dir '$CC_ROOT -fi -cd $WORKING_DIR -# TODO(mblow): ensure logging configuration is correct here... -# export JAVA_OPTS="$JAVA_OPTS -Dlog4j.configuration=file:$WORKING_DIR/conf/log4j.properties" - -DATE=`date` -cat <<EOF >> $LOG_DIR/cc.log --------------------------------------------------------------------------------- -LOG START: $DATE -JAVA_OPTS: $JAVA_OPTS --------------------------------------------------------------------------------- -EOF -$ASTERIX_HOME/bin/asterixcc $ccArgs >> $LOG_DIR/cc.log 2>&1 \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/events.xml ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/events.xml b/asterixdb/asterix-events/src/main/resources/events/events.xml deleted file mode 100644 index c4f82c4..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/events.xml +++ /dev/null @@ -1,138 +0,0 @@ -<!-- - ! 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. - !--> -<events xmlns="events"> - <event> - <type>node_join</type> - <script>node_join/nc_join.sh</script> - <description>Creates a NodeController process at a specified location.</description> - <args>location_of_cc location(hostname/ip_address) node_controller_id</args> - <daemon>true</daemon> - </event> - <event> - <type>node_failure</type> - <script>node_failure/nc_failure.sh</script> - <description>Kills a NodeController process at a specified location.</description> - <args>node_controller_id</args> - <daemon>false</daemon> - </event> - <event> - <type>cc_start</type> - <script>cc_start/cc_start.sh</script> - <description>Starts a ClusterController process at a specified location.</description> - <args></args> - <daemon>true</daemon> - </event> - <event> - <type>cc_failure</type> - <script>cc_failure/cc_failure.sh</script> - <description>Kills the Cluster Controller process running at a specified location.</description> - <args></args> - <daemon>false</daemon> - </event> - <event> - <type>node_restart</type> - <script>node_restart/nc_restart.sh</script> - <description>Shuts and restarts a NodeControllerProcess after a specified time interval, at a specified location</description> - <args>address of cc, node controller id and sleep interval(seconds)</args> - <daemon>true</daemon> - </event> - <event> - <type>asterix_deploy</type> - <script>asterix_deploy/asterix_deploy.sh</script> - <description>Deploys Asterix application on a cluster running hyracks</description> - <args>IP address of the node running the hyracks cluster controller</args> - <daemon>false</daemon> - </event> - <event> - <type>zookeeper_start</type> - <script>zookeeper/start.sh</script> - <description>Launches ZooKeeper server process</description> - <args>IP address of the ZooKeeper server</args> - <daemon>true</daemon> - </event> - <event> - <type>zookeeper_stop</type> - <script>zookeeper/stop.sh</script> - <description>Terminates ZooKeeper server process</description> - <args>IP address of the ZooKeeper server</args> - <daemon>false</daemon> - </event> - <event> - <type>file_transfer</type> - <script>file/transfer.sh</script> - <description>Copies a file on the local file system to a remote node</description> - <args>local_source_path destination_node destination_path</args> - <daemon>false</daemon> - </event> - <event> - <type>directory_transfer</type> - <script>file/dir_transfer.sh</script> - <description>Copies a directory (and its contents) on the local file system to a remote node</description> - <args>local_source_path destination_node destination_path</args> - <daemon>false</daemon> - </event> - <event> - <type>directory_copy</type> - <script>file/dir_copy.sh</script> - <description>Copies a directory (and its contents) from the remove file system to the local file system</description> - <args>destination_node destination_path local_source_path</args> - <daemon>false</daemon> - </event> - <event> - <type>file_delete</type> - <script>file/delete.sh</script> - <description>Deletes a file on the local file system to a remote node</description> - <args>destination_node destination_path</args> - <daemon>false</daemon> - </event> - <event> - <type>file_create</type> - <script>file/create_file.sh</script> - <description>Creates a file on the local file system to a remote node</description> - <args>destination_node destination_path</args> - <daemon>false</daemon> - </event> - <event> - <type>backup</type> - <script>backup/backup.sh</script> - <description>Takes a backup of an Asterix instance</description> - <args>Asterix_data_dir HDFSurl</args> - <daemon>false</daemon> - </event> - <event> - <type>restore</type> - <script>restore/restore.sh</script> - <description>Restores an Asterix instance from a back up</description> - <args>Asterix_data_dir HDFSurl</args> - <daemon>false</daemon> - </event> - <event> - <type>hdfs_delete</type> - <script>hdfs/delete.sh</script> - <description>Deletes an HDFS path</description> - <args>WorkingDir HadoopVersion HDFSUrl Path_to_Delete</args> - <daemon>false</daemon> - </event> - <event> - <type>node_info</type> - <script>node_info/node_info.sh</script> - <description>Retrieved environment information for a node</description> - <daemon>false</daemon> - </event> -</events> http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/execute.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/execute.sh b/asterixdb/asterix-events/src/main/resources/events/execute.sh deleted file mode 100755 index d9ad7b2..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/execute.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -# 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. - -USERNAME=$1 -if [ ! -d $MANAGIX_HOME/logs ]; -then - mkdir -p $MANAGIX_HOME/logs -fi -LOGDIR=$MANAGIX_HOME/logs -if [ $DAEMON == "false" ]; then - if [ -z $USERNAME ] - then - cmd_output=$(ssh $IP_LOCATION "$ENV $SCRIPT $ARGS" 2>&1 >/dev/null) - echo "ssh $IP_LOCATION $ENV $SCRIPT $ARGS" >> $LOGDIR/execute.log - echo "$cmd_output" - else - echo "ssh -l $USERNAME $IP_LOCATION $ENV $SCRIPT $ARGS" >> $LOGDIR/execute.log - cmd_output=$(ssh -l $USERNAME $IP_LOCATION "$ENV $SCRIPT $ARGS" 2>&1 >/dev/null) - echo "$cmd_output" - fi -else - if [ -z $USERNAME ]; - then - echo "ssh $IP_LOCATION $ENV $SCRIPT $ARGS &" >> $LOGDIR/execute.log - ssh $IP_LOCATION "$ENV $SCRIPT $ARGS" & - else - echo "ssh -l $USERNAME $IP_LOCATION $ENV $SCRIPT $ARGS &" >> $LOGDIR/execute.log - ssh -l $USERNAME $IP_LOCATION "$ENV $SCRIPT $ARGS" & - fi -fi http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/file/create_file.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/file/create_file.sh b/asterixdb/asterix-events/src/main/resources/events/file/create_file.sh deleted file mode 100755 index 01aa3c5..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/file/create_file.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# 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. - -mkdir -p $1 -echo "touch $1/$2" >> ~/file_create.log -touch $1/$2 http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/file/delete.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/file/delete.sh b/asterixdb/asterix-events/src/main/resources/events/file/delete.sh deleted file mode 100755 index 9c8b0e0..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/file/delete.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -#/* -# 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. - -PATH_TO_DELETE=$1 -echo "rm -rf $PATH_TO_DELETE" >> ~/backup.log -rm -rf $PATH_TO_DELETE http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/file/dir_copy.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/file/dir_copy.sh b/asterixdb/asterix-events/src/main/resources/events/file/dir_copy.sh deleted file mode 100755 index fc1a346..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/file/dir_copy.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -#/* -# 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. - -USERNAME=$1 -SRC_HOST=$2 -SRC_DIR=$3 -DEST_DIR=$4 -mkdir -p $DEST_DIR -echo "scp -r $USERNAME@$SRC_HOST:$SRC_DIR $DEST_DIR" -scp -r $USERNAME@$SRC_HOST:$SRC_DIR $DEST_DIR http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/file/dir_transfer.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/file/dir_transfer.sh b/asterixdb/asterix-events/src/main/resources/events/file/dir_transfer.sh deleted file mode 100755 index ec16c02..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/file/dir_transfer.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -#/* -# 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. - -USERNAME=$1 -DIR_TO_TRANSFER=$2 -DEST_HOST=$3 -DEST_DIR=$4 -ssh -l $USERNAME $DEST_HOST "mkdir -p $DEST_DIR" -echo "scp -r $DIR_TO_TRANSFER $USERNAME@$DEST_HOST:$DEST_DIR/" -scp -r $DIR_TO_TRANSFER $USERNAME@$DEST_HOST:$DEST_DIR/ http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/file/transfer.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/file/transfer.sh b/asterixdb/asterix-events/src/main/resources/events/file/transfer.sh deleted file mode 100755 index be6add2..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/file/transfer.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -#/* -# 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. - - -USERNAME=$1 -FILE_TO_TRANSFER=$2 -DEST_HOST=$3 -DEST_DIR=$4 -POST_ACTION=$5 -ssh -l $USERNAME $DEST_HOST "mkdir -p $DEST_DIR" -echo "scp $FILE_TO_TRANSFER $USERNAME@$DEST_HOST:$DEST_DIR/" -scp $FILE_TO_TRANSFER $USERNAME@$DEST_HOST:$DEST_DIR/ -if [ $POST_ACTION == "unpack" ] - then - filename=`echo ${FILE_TO_TRANSFER##*/}` - fileType=`echo ${FILE_TO_TRANSFER##*.}` - if [ $fileType == "tar" ] - then - echo "ssh -l $USERNAME $DEST_HOST cd $DEST_DIR && tar xf $filename" - ssh -l $USERNAME $DEST_HOST "cd $DEST_DIR && tar xf $filename" - else if [ $fileType == "zip" ] - then - echo "ssh -l $USERNAME $DEST_HOST unzip -o -q -d $DEST_DIR $DEST_DIR/$filename" - ssh -l $USERNAME $DEST_HOST "unzip -o -q -d $DEST_DIR $DEST_DIR/$filename" - ssh -l $USERNAME $DEST_HOST "chmod -R 755 $DEST_DIR" - fi - fi -fi http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/hdfs/delete.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/hdfs/delete.sh b/asterixdb/asterix-events/src/main/resources/events/hdfs/delete.sh deleted file mode 100755 index 1098b0c..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/hdfs/delete.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash -#/* -# 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. - -WORKING_DIR=$1 -HADOOP_VERSION=$2 -HDFS_URL=$3 -HDFS_PATH=$4 -export HADOOP_HOME=$WORKING_DIR/hadoop-$HADOOP_VERSION -echo "$HADOOP_HOME/bin/hadoop fs -rmr $HDFS_URL/$HDFS_PATH" -$HADOOP_HOME/bin/hadoop fs -rmr $HDFS_URL/$HDFS_PATH http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/node_failure/nc_failure.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/node_failure/nc_failure.sh b/asterixdb/asterix-events/src/main/resources/events/node_failure/nc_failure.sh deleted file mode 100755 index 50dfb26..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/node_failure/nc_failure.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -#/* -# 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. - -NC_ID=$1 - -PARENT_ID=`ps -ef | grep nc_join | grep -v grep | grep -v ssh| grep $NC_ID | head -n 1 | awk '{ print $2 }'` -PID=`ps -ef | grep asterix | awk "\\\$3 == $PARENT_ID { print \\\$2 }"` -kill -15 $PID - -cmd_output=$(ps -ef | awk "\\\$3 == $PID {print \\\$2}") -tries=0 -while [ ${#cmd_output} -ne 0 -a $tries -lt 15 ] -do - sleep 1 - kill -15 $PID - tries=`expr $tries + 1` - cmd_output=$(ps -ef | awk "\\\$3 == $PID {print \\\$2}") -done -if [ ${#cmd_output} -ne 0 ]; -then - kill -9 $PID -fi \ No newline at end of file http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/node_info/node_info.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/node_info/node_info.sh b/asterixdb/asterix-events/src/main/resources/events/node_info/node_info.sh deleted file mode 100755 index de2f320..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/node_info/node_info.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -#/* -# 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. - - -JAVA_VERSION=`java -version 2>&1 |awk 'NR==1{ gsub(/"/,""); print $3 }'` -echo "java_version=$JAVA_VERSION" 1>&2 http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/node_join/nc_join.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/node_join/nc_join.sh b/asterixdb/asterix-events/src/main/resources/events/node_join/nc_join.sh deleted file mode 100755 index 626739a..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/node_join/nc_join.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -#/* -# 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. - -CC_HOST=$1 -NC_ID=$2 -IO_DEVICES=$3 -INITIAL_RUN_FLAG=$4 -if [ ! -d $LOG_DIR ]; -then - mkdir -p $LOG_DIR -fi - -cd $WORKING_DIR - -DATE=`date` -cat <<EOF >> $LOG_DIR/${NC_ID}.log --------------------------------------------------------------------------------- -LOG START: $DATE -JAVA_OPTS: $JAVA_OPTS --------------------------------------------------------------------------------- -EOF -$ASTERIX_HOME/bin/asterixnc -node-id $NC_ID -cluster-address $CC_HOST -cluster-port $CLUSTER_NET_PORT -address $IP_LOCATION -data-listen-address $IP_LOCATION -iodevices $IO_DEVICES -result-listen-address $IP_LOCATION $INITIAL_RUN_FLAG >> $LOG_DIR/${NC_ID}.log 2>&1 http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/node_restart/nc_restart.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/node_restart/nc_restart.sh b/asterixdb/asterix-events/src/main/resources/events/node_restart/nc_restart.sh deleted file mode 100755 index 521b402..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/node_restart/nc_restart.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash -#/* -# 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. - -CC_HOST=$1 -NC_ID=$2 -SLEEP_TIME=$3 - -if [ $NC_ID == 'ANY' ] -then - NC_ID="." - PARENT_ID=`ps -ej | tr -s " " | grep nc_join | grep -v grep | grep -v ssh | awk '{ print $2 }' | head -n 1` - PARENT_PROCESS_ENTRY=`ps -ef | grep $PARENT_ID | grep -v grep | head -n 1` - NC_ID=`echo ${PARENT_PROCESS_ENTRY##* }` - echo "NCid is $NC_ID" >> ~/try.txt -else - PARENT_ID=`ps -ej | tr -s " " | grep nc_join | grep -v grep | grep -v ssh | grep $NC_ID | awk '{ print $2 }' | head -n 1` -fi - -PID=`ps -ej | tr -s " " | grep hyracks | grep -v grep | grep -v nc_join | awk "\\\$3 == $PARENT_ID { print \\\$2 }" | head -n 1` -kill -9 $PID - -sleep $3 - -$HYRACKS_HOME/hyracks-server/target/hyracks-server-0.2.2-SNAPSHOT-binary-assembly/bin/hyracksnc -node-id $NC_ID -cluster-address $CC_HOST -cluster-port 1099 -address $IP_LOCATION -data-listen-address $IP_LOCATION http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/prepare.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/prepare.sh b/asterixdb/asterix-events/src/main/resources/events/prepare.sh deleted file mode 100755 index 6edd950..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/prepare.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -# 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. http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/events/restore/restore.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/events/restore/restore.sh b/asterixdb/asterix-events/src/main/resources/events/restore/restore.sh deleted file mode 100755 index 6ba59da..0000000 --- a/asterixdb/asterix-events/src/main/resources/events/restore/restore.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env bash -#/* -# 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. - -WORKING_DIR=$1 -ASTERIX_INSTANCE_NAME=$2 -ASTERIX_IODEVICES=$3 -NODE_STORE=$4 -ASTERIX_ROOT_METADATA_DIR=$5 -TXN_LOG_DIR=$6 -BACKUP_ID=$7 -BACKUP_DIR=$8 -BACKUP_TYPE=$9 -NODE_ID=${10} -HDFS_URL=${11} -HADOOP_VERSION=${12} -HADOOP_HOME=$WORKING_DIR/hadoop-$HADOOP_VERSION - -iodevices=$(echo $ASTERIX_IODEVICES | tr "," "\n") - -index=1 -for iodevice in $iodevices -do - NODE_BACKUP_DIR=$BACKUP_DIR/$ASTERIX_INSTANCE_NAME/$BACKUP_ID/$NODE_ID - - # remove the existing store directory - STORE_DIR=$iodevice/$NODE_STORE - - # if STORE_DIR ends with a /, remove it - if [ ${STORE_DIR:${#STORE_DIR}-1} == "/" ]; - then - STORE_DIR=${STORE_DIR:0:${#STORE_DIR}-1} - fi - - DEST_STORE_DIR=${STORE_DIR%/*} - SOURCE_STORE_DIR=${NODE_STORE##*/} - rm -rf $DEST_STORE_DIR/$SOURCE_STORE_DIR - - # remove the existing log directory - DEST_LOG_DIR=$TXN_LOG_DIR - rm -rf $DEST_LOG_DIR/* - TXN_LOG_DIR_NAME=${TXN_LOG_DIR%/*} - - # remove the existing asterix metadata directory - rm -rf $iodevice/$ASTERIX_ROOT_METADATA_DIR - - if [ $BACKUP_TYPE == "hdfs" ]; - then - # RESTORE FROM HDFS BACKUP - - # copy store directory - $HADOOP_HOME/bin/hadoop fs -copyToLocal $HDFS_URL/$NODE_BACKUP_DIR/$SOURCE_STORE_DIR $DEST_STORE_DIR/ - - # copy asterix metadata root directory and txn log directory - if [ $index -eq 1 ]; - then - $HADOOP_HOME/bin/hadoop fs -copyToLocal $HDFS_URL/$NODE_BACKUP_DIR/$ASTERIX_ROOT_METADATA_DIR $iodevice/ - - # copy transaction logs directory - $HADOOP_HOME/bin/hadoop fs -copyToLocal $HDFS_URL/$NODE_BACKUP_DIR/$TXN_LOG_DIR_NAME $$TXN_LOG_DIR/ - fi - - else - - # RESTORE FROM LOCAL BACKUP - # copy store directory - cp -r $NODE_BACKUP_DIR/$SOURCE_STORE_DIR $DEST_STORE_DIR/ - - # copy asterix metadata root directory and txn log directory - if [ $index -eq 1 ]; - then - cp -r $NODE_BACKUP_DIR/$ASTERIX_ROOT_METADATA_DIR $iodevice/ - - # copy transaction logs directory - cp -r $NODE_BACKUP_DIR/$TXN_LOG_DIR_NAME $TXN_LOG_DIR/ - fi - - fi - index=`expr $index + 1` -done http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/schema/event.xsd ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/schema/event.xsd b/asterixdb/asterix-events/src/main/resources/schema/event.xsd deleted file mode 100644 index 146c351..0000000 --- a/asterixdb/asterix-events/src/main/resources/schema/event.xsd +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> - -<!-- - ! 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. - !--> - -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:es="events" targetNamespace="events" elementFormDefault="qualified"> - -<!-- definition of simple types --> -<xs:element name="script" type="xs:string"/> -<xs:element name="type" type="xs:string"/> -<xs:element name="description" type="xs:string"/> -<xs:element name="args" type="xs:string"/> -<xs:element name="daemon" type="xs:boolean"/> - -<!-- definition of complex elements --> - -<xs:element name="event"> - <xs:complexType> - <xs:sequence> - <xs:element ref="es:type"/> - <xs:element ref="es:script"/> - <xs:element ref="es:description"/> - <xs:element ref="es:args"/> - <xs:element ref="es:daemon"/> - </xs:sequence> - </xs:complexType> -</xs:element> - -<xs:element name="events"> - <xs:complexType> - <xs:sequence> - <xs:element ref="es:event" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> -</xs:element> - -</xs:schema> http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/schema/installer-conf.xsd ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/schema/installer-conf.xsd b/asterixdb/asterix-events/src/main/resources/schema/installer-conf.xsd deleted file mode 100644 index e5bc3ed..0000000 --- a/asterixdb/asterix-events/src/main/resources/schema/installer-conf.xsd +++ /dev/null @@ -1,86 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> - -<!-- - ! 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. - !--> - -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:mg="installer" targetNamespace="installer" elementFormDefault="qualified"> - - <!-- definition of simple types --> - <xs:element name="configured" type="xs:boolean" /> - <xs:element name="asterix_home" type="xs:string" /> - <xs:element name="hyracks_home" type="xs:string" /> - <xs:element name="hdfsurl" type="xs:string" /> - <xs:element name="server" type="xs:string" /> - <xs:element name="clientPort" type="xs:integer" /> - <xs:element name="homeDir" type="xs:string" /> - <xs:element name="version" type="xs:string" /> - <xs:element name="url" type="xs:string" /> - <xs:element name="backupDir" type="xs:string" /> - <xs:element name="java_home" type="xs:string" /> - - <!-- definition of complex elements --> - <xs:element name="hdfs"> - <xs:complexType> - <xs:sequence> - <xs:element ref="mg:version" /> - <xs:element ref="mg:url" /> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="backup"> - <xs:complexType> - <xs:sequence> - <xs:element ref="mg:hdfs" minOccurs="0" /> - <xs:element ref="mg:backupDir" /> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="zookeeper"> - <xs:complexType> - <xs:sequence> - <xs:element ref="mg:homeDir" /> - <xs:element ref="mg:clientPort" /> - <xs:element ref="mg:servers" /> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="servers"> - <xs:complexType> - <xs:sequence> - <xs:element ref="mg:java_home" /> - <xs:element ref="mg:server" maxOccurs="unbounded" /> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="configuration"> - <xs:complexType> - <xs:sequence> - <xs:element ref="mg:configured" minOccurs="1" /> - <xs:element ref="mg:backup" minOccurs="0" /> - <xs:element ref="mg:zookeeper" minOccurs="1" /> - </xs:sequence> - </xs:complexType> - </xs:element> - -</xs:schema> http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/schema/jaxb-bindings.xjb ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/schema/jaxb-bindings.xjb b/asterixdb/asterix-events/src/main/resources/schema/jaxb-bindings.xjb deleted file mode 100644 index 0b191a6..0000000 --- a/asterixdb/asterix-events/src/main/resources/schema/jaxb-bindings.xjb +++ /dev/null @@ -1,28 +0,0 @@ -<!-- - ! 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. - !--> - -<jxb:bindings version="1.0" -xmlns:jxb="http://java.sun.com/xml/ns/jaxb" -xmlns:xs="http://www.w3.org/2001/XMLSchema"> - -<jxb:globalBindings> - <jxb:serializable uid="1"/> -</jxb:globalBindings> - -</jxb:bindings> http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/schema/pattern.xsd ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/schema/pattern.xsd b/asterixdb/asterix-events/src/main/resources/schema/pattern.xsd deleted file mode 100644 index c087374..0000000 --- a/asterixdb/asterix-events/src/main/resources/schema/pattern.xsd +++ /dev/null @@ -1,134 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> - -<!-- - ! 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. - !--> - -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:eg="patterns" targetNamespace="patterns"> - - -<!-- definition of simple types --> -<xs:element name="maxOccurs" type = "xs:int"/> -<xs:element name="pargs" type="xs:string"/> -<xs:element name="absvalue" type="xs:string"/> -<xs:element name="unit" type="xs:string"/> -<xs:element name="type" type="xs:string"/> -<xs:element name="min" type="xs:string"/> -<xs:element name="max" type="xs:string"/> -<xs:element name="abs" type="xs:string"/> -<xs:element name="set" type="xs:string"/> -<xs:element name="exclude" type="xs:string"/> -<xs:element name="reuse" type="xs:boolean"/> -<!-- definition of attributes --> - -<!-- definition of complex elements --> - -<xs:element name="range"> - <xs:complexType> - <xs:sequence> - <xs:element ref="eg:set"/> - <xs:element ref="eg:exclude" minOccurs="0"/> - <xs:element ref="eg:reuse" minOccurs="0"/> - </xs:sequence> - </xs:complexType> -</xs:element> - -<xs:element name="minmax"> - <xs:complexType> - <xs:sequence> - <xs:element ref="eg:min"/> - <xs:element ref="eg:max"/> - </xs:sequence> - </xs:complexType> -</xs:element> - - -<xs:element name="random"> - <xs:complexType> - <xs:sequence> - <xs:element ref="eg:minmax" minOccurs="0"/> - <xs:element ref="eg:range" minOccurs="0"/> - </xs:sequence> - </xs:complexType> -</xs:element> - -<xs:element name="value"> - <xs:complexType> - <xs:sequence> - <xs:element ref="eg:random" minOccurs="0"/> - <xs:element ref="eg:absvalue" minOccurs="0"/> - </xs:sequence> - </xs:complexType> -</xs:element> - -<xs:element name="nodeid"> - <xs:complexType> - <xs:sequence> - <xs:element ref="eg:value"/> - </xs:sequence> - </xs:complexType> -</xs:element> - -<xs:element name="period"> - <xs:complexType> - <xs:sequence> - <xs:element ref="eg:absvalue"/> - <xs:element ref="eg:unit"/> - </xs:sequence> - </xs:complexType> -</xs:element> - -<xs:element name="delay"> - <xs:complexType> - <xs:sequence> - <xs:element ref="eg:value"/> - <xs:element ref="eg:unit"/> - </xs:sequence> - </xs:complexType> -</xs:element> - -<xs:element name="event"> - <xs:complexType> - <xs:sequence> - <xs:element ref="eg:type"/> - <xs:element ref="eg:nodeid"/> - <xs:element ref="eg:pargs"/> - </xs:sequence> - </xs:complexType> -</xs:element> - -<xs:element name="pattern"> - <xs:complexType> - <xs:sequence> - <xs:element ref="eg:delay"/> - <xs:element ref="eg:maxOccurs" maxOccurs="1" minOccurs="0"/> - <xs:element ref="eg:period"/> - <xs:element ref="eg:event"/> - </xs:sequence> - </xs:complexType> -</xs:element> - -<xs:element name="patterns"> - <xs:complexType> - <xs:sequence> - <xs:element ref="eg:pattern" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> -</xs:element> - -</xs:schema> http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/scripts/execute.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/scripts/execute.sh b/asterixdb/asterix-events/src/main/resources/scripts/execute.sh deleted file mode 100755 index ed3a0f3..0000000 --- a/asterixdb/asterix-events/src/main/resources/scripts/execute.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash -#/* -# 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. -USERNAME=$1 -if [ ! -d $MANAGIX_HOME/logs ]; -then - mkdir -p $MANAGIX_HOME/logs -fi -LOGDIR=$MANAGIX_HOME/logs -if [ $DAEMON == "false" ]; then - if [ -z $USERNAME ] - then - cmd_output=$(ssh $IP_LOCATION "$ENV $SCRIPT $ARGS" 2>&1 >/dev/null) - echo "ssh $IP_LOCATION $ENV $SCRIPT $ARGS" >> $LOGDIR/execute.log - echo "$cmd_output" - else - echo "ssh -l $USERNAME $IP_LOCATION $ENV $SCRIPT $ARGS" >> $LOGDIR/execute.log - cmd_output=$(ssh -l $USERNAME $IP_LOCATION "$ENV $SCRIPT $ARGS" 2>&1 >/dev/null) - echo "$cmd_output" - fi -else - if [ -z $USERNAME ]; - then - echo "ssh $IP_LOCATION $ENV $SCRIPT $ARGS &" >> $LOGDIR/execute.log - ssh $IP_LOCATION "$ENV $SCRIPT $ARGS" & - else - echo "ssh -l $USERNAME $IP_LOCATION $ENV $SCRIPT $ARGS &" >> $LOGDIR/execute.log - ssh -l $USERNAME $IP_LOCATION "$ENV $SCRIPT $ARGS" & - fi -fi http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-events/src/main/resources/scripts/prepare.sh ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-events/src/main/resources/scripts/prepare.sh b/asterixdb/asterix-events/src/main/resources/scripts/prepare.sh deleted file mode 100755 index 83cc43c..0000000 --- a/asterixdb/asterix-events/src/main/resources/scripts/prepare.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -#/* -# 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. http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/StreamRecordReaderProvider.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/StreamRecordReaderProvider.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/StreamRecordReaderProvider.java index d6df81d..701d0f2 100644 --- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/StreamRecordReaderProvider.java +++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/StreamRecordReaderProvider.java @@ -32,7 +32,6 @@ import java.util.Map; import org.apache.asterix.common.exceptions.AsterixException; import org.apache.asterix.common.exceptions.ErrorCode; -import org.apache.asterix.external.api.AsterixInputStream; import org.apache.asterix.external.input.record.reader.stream.StreamRecordReader; import org.apache.asterix.external.util.ExternalDataConstants; import org.apache.commons.io.IOUtils; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/FeedUtils.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/FeedUtils.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/FeedUtils.java index dc8a8aa..8481064 100644 --- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/FeedUtils.java +++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/FeedUtils.java @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import org.apache.asterix.common.api.IClusterManagementWork; import org.apache.asterix.common.cluster.ClusterPartition; import org.apache.asterix.common.dataflow.ICcApplicationContext; import org.apache.asterix.common.exceptions.AsterixException; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-installer/pom.xml ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-installer/pom.xml b/asterixdb/asterix-installer/pom.xml index ff5b8c4..893e0e9 100644 --- a/asterixdb/asterix-installer/pom.xml +++ b/asterixdb/asterix-installer/pom.xml @@ -26,11 +26,6 @@ <artifactId>asterix-installer</artifactId> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <appendedResourcesDirectory>${basedir}/src/main/appended-resources</appendedResourcesDirectory> - - <failsafe.test.excludes>**/DmlRecoveryIT.java</failsafe.test.excludes> - <cluster.test.excludes>**/AsterixClusterLifeCycleIT.java</cluster.test.excludes> - <cluster.extest.excludes>**/ClusterExecutionIT.java</cluster.extest.excludes> </properties> <licenses> @@ -42,509 +37,4 @@ </license> </licenses> - <build> - <plugins> - <plugin> - <groupId>org.apache.hyracks</groupId> - <artifactId>license-automation-plugin</artifactId> - <executions> - <execution> - <phase>generate-resources</phase> - <goals> - <!--<goal>licensedownload</goal>--> - <goal>generate</goal> - </goals> - </execution> - </executions> - <configuration> - <templateRootDir>${basedir}/../src/main/licenses/templates</templateRootDir> - <generatedFiles> - <generatedFile> - <template>asterix-license.ftl</template> - <outputFile>LICENSE</outputFile> - </generatedFile> - <generatedFile> - <template>asterix-notice.ftl</template> - <outputFile>NOTICE</outputFile> - </generatedFile> - </generatedFiles> - <location>repo/</location> - <timeoutSecs>10</timeoutSecs> - <extraLicenseMaps> - <extraLicenseMap> - <file>${basedir}/../asterix-server/target/generated-resources/license_map.json</file> - <location>asterix/asterix-server-${project.version}-binary-assembly.zip::repo/</location> - </extraLicenseMap> - </extraLicenseMaps> - <models> - <model>${basedir}/../src/main/appended-resources/supplemental-models.xml</model> - </models> - <downloadDir>${project.build.directory}/generated-resources/license</downloadDir> - <excludedScopes> - <excludedScope>test</excludedScope> - </excludedScopes> - <excludes> - <exclude>org.apache.asterix:*</exclude> - <exclude>org.apache.algebricks:*</exclude> - <exclude>org.apache.hyracks:*</exclude> - </excludes> - <licenseDirectory>${basedir}/../src/main/licenses/content</licenseDirectory> - <dependencySets> - <dependencySet> - <includes> - <!-- NOTE! Any changes here must be mirrored in src/main/assembly/binary-assembly.xml --> - <include>log4j:log4j</include> - <include>org.apache.asterix:asterix-events</include> - <include>org.apache.asterix:asterix-common</include> - <include>org.apache.commons:commons-lang3</include> - <include>org.apache.zookeeper:zookeeper</include> - <include>args4j:args4j</include> - <include>log4j:log4j</include> - <include>commons-io:commons-io</include> - <include>org.slf4j:slf4j-api</include> - <include>org.slf4j:slf4j-log4j12</include> - </includes> - <location>lib</location> - </dependencySet> - <dependencySet> - <includes> - <!-- NOTE! Any changes here must be mirrored in src/main/assembly/binary-assembly.xml --> - <include>commons-cli:commons-cli</include> - <include>commons-logging:commons-logging</include> - </includes> - <location>.installer/hadoop-0.20.2/lib</location> - </dependencySet> - <dependencySet> - <includes> - <!-- NOTE! Any changes here must be mirrored in src/main/assembly/binary-assembly.xml --> - <include>org.apache.zookeeper:zookeeper</include> - <include>log4j:log4j</include> - <include>org.slf4j:slf4j-api</include> - </includes> - <location>.installer/zookeeper/lib</location> - </dependencySet> - </dependencySets> - <overrides> - <override> - <gav>org.apache.zookeeper:zookeeper:3.4.5</gav> - <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> - </override> - </overrides> - <templateProperties> - <packageName>Apache AsterixDB Managix Install</packageName> - <asterixAppLocation>repo/asterix-app-${project.version}.jar, within asterix/asterix-server-${project.version}-binary-assembly.zip</asterixAppLocation> - <hyracksControlCcLocation>repo/hyracks-control-cc-${project.version}.jar, within asterix/asterix-server-${project.version}-binary-assembly.zip</hyracksControlCcLocation> - <hivecompatLocation>repo/asterix-hivecompat-${project.version}.jar, within asterix/asterix-server-${project.version}-binary-assembly.zip</hivecompatLocation> - </templateProperties> - </configuration> - </plugin> - <plugin> - <groupId>org.jvnet.jaxb2.maven2</groupId> - <artifactId>maven-jaxb2-plugin</artifactId> - <executions> - <execution> - <id>configuration</id> - <goals> - <goal>generate</goal> - </goals> - <configuration> - <args> - <arg>-Xsetters</arg> - <arg>-Xvalue-constructor</arg> - </args> - <plugins> - <plugin> - <groupId>org.jvnet.jaxb2_commons</groupId> - <artifactId>jaxb2-basics</artifactId> - <version>0.6.2</version> - </plugin> - <plugin> - <groupId>org.jvnet.jaxb2_commons</groupId> - <artifactId>jaxb2-value-constructor</artifactId> - <version>3.0</version> - </plugin> - </plugins> - <schemaDirectory>src/main/resources/schema</schemaDirectory> - <schemaIncludes> - <include>installer-conf.xsd</include> - </schemaIncludes> - <generatePackage>org.apache.asterix.installer.schema.conf</generatePackage> - <generateDirectory>${project.build.directory}/generated-sources/configuration</generateDirectory> - </configuration> - </execution> - <execution> - <id>cluster</id> - <goals> - <goal>generate</goal> - </goals> - <configuration> - <schemaDirectory>src/main/resources/schema</schemaDirectory> - <schemaIncludes> - <include>cluster.xsd</include> - </schemaIncludes> - <generatePackage>org.apache.asterix.installer.schema.cluster</generatePackage> - <bindingDirectory>src/main/resources/schema</bindingDirectory> - <bindingIncludes> - <bindingInclude>jaxb-bindings.xjb</bindingInclude> - </bindingIncludes> - <generateDirectory>${project.build.directory}/generated-sources/cluster</generateDirectory> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <executions> - <execution> - <configuration> - <descriptors> - <descriptor>src/main/assembly/binary-assembly.xml</descriptor> - </descriptors> - </configuration> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <artifactId>maven-resources-plugin</artifactId> - <executions> - <execution> - <id>copy-test-data</id> - <phase>generate-resources</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>target/data</outputDirectory> - <overwrite>true</overwrite> - <resources> - <resource> - <directory>../asterix-app/data/external-parser</directory> - <includes> - <include>jobads.new</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy-external-testlib</id> - <phase>pre-integration-test</phase> - <goals> - <goal>copy-dependencies</goal> - </goals> - <configuration> - <includeClassifiers>testlib</includeClassifiers> - <outputDirectory>target/resources/externallib</outputDirectory> - <stripVersion>true</stripVersion> - <overWriteIfNewer>true</overWriteIfNewer> - </configuration> - </execution> - </executions> - <configuration> - <usedDependencies combine.children="append"> - <usedDependency>org.apache.asterix:asterix-server</usedDependency> - <usedDependency>org.apache.hadoop:hadoop-common</usedDependency> - <usedDependency>org.apache.hadoop:hadoop-hdfs</usedDependency> - <usedDependency>org.apache.hadoop:hadoop-minicluster</usedDependency> - <usedDependency>org.apache.zookeeper:zookeeper</usedDependency> - </usedDependencies> - <ignoredUnusedDeclaredDependencies> - <ignoredUnusedDeclaredDependency>org.apache.asterix:asterix-external-data:zip:*</ignoredUnusedDeclaredDependency> - <ignoredUnusedDeclaredDependency>org.apache.asterix:asterix-external-data:test-jar:*</ignoredUnusedDeclaredDependency> - </ignoredUnusedDeclaredDependencies> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.rat</groupId> - <artifactId>apache-rat-plugin</artifactId> - <configuration> - <licenses combine.children="append"> - <license implementation="org.apache.rat.analysis.license.MITLicense"/> - <license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense"> - <licenseFamilyCategory>MIT</licenseFamilyCategory> - <licenseFamilyName>JQuery</licenseFamilyName> - <patterns>(c) jQuery Foundation | jquery.org/license</patterns> - </license> - <license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense"> - <licenseFamilyCategory>MIT</licenseFamilyCategory> - <licenseFamilyName>Bootstrap</licenseFamilyName> - <patterns>Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)</patterns> - </license> - <license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense"> - <licenseFamilyCategory>MIT</licenseFamilyCategory> - <licenseFamilyName>AngularJS</licenseFamilyName> - <patterns>http://angularjs.org | (c) 2010-2016 Google, Inc. | License: MIT</patterns> - </license> - </licenses> - <licenseFamilies combine.children="append"> - <licenseFamily implementation="org.apache.rat.license.MITLicenseFamily"/> - <licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily"> - <familyName>JQuery</familyName> - </licenseFamily> - <licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily"> - <familyName>Bootstrap</familyName> - </licenseFamily> - <licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily"> - <familyName>AngularJS</familyName> - </licenseFamily> - </licenseFamilies> - <excludes combine.children="append"> - <exclude>src/test/resources/clusterts/id_rsa</exclude> - <exclude>src/test/resources/clusterts/id_rsa.pub</exclude> - <exclude>src/test/resources/clusterts/known_hosts</exclude> - <exclude>src/test/resources/docker/id_rsa</exclude> - <exclude>src/test/resources/docker/id_rsa.pub</exclude> - <exclude>src/test/resources/transactionts/results/query_after_restart/big_object_20M/big_object_20M.1.adm.template</exclude> - <exclude>src/test/resources/integrationts/restart/tweets.json</exclude> <!-- https://issues.apache.org/jira/browse/ASTERIXDB-1850 --> - </excludes> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <configuration> - <excludes combine.children="append"> - <exclude>${failsafe.test.excludes}</exclude> - <exclude>${cluster.test.excludes}</exclude> - <exclude>${cluster.extest.excludes}</exclude> - </excludes> - </configuration> - </plugin> - </plugins> - <pluginManagement> - <plugins> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId>org.apache.hyracks</groupId> - <artifactId>license-automation-plugin</artifactId> - <versionRange>[0.0,)</versionRange> - <goals> - <goal>generate</goal> - </goals> - </pluginExecutionFilter> - <action> - <ignore /> - </action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> - </plugins> - </pluginManagement> - </build> - - <profiles> - <profile> - <id>cluster-tests</id> - <activation> - <activeByDefault>false</activeByDefault> - <property> - <name>clusterTest</name> - <value>true</value> - </property> - </activation> - <build> - <plugins> - <plugin> - <groupId>net.ju-n.maven.plugins</groupId> - <artifactId>vagrant-maven-plugin</artifactId> - <version>1.1.0-SNAPSHOT</version> - <executions> - - <!-- Before tests: import box, start VM --> - <execution> - <id>setup-and-start-vagrant-vm</id> - <phase>pre-integration-test</phase> - <goals> - <goal>up</goal> - </goals> - <configuration> - <box>chef/centos-6.5</box> - <url>https://vagrantcloud.com/chef/centos-6.5</url> - <vagrantHome>${project.basedir}/src/test/resources/clusterts</vagrantHome> - </configuration> - </execution> - - <!-- After tests: shut down, destroy VM --> - <execution> - <id>destroy-vagrant-vm</id> - <phase>post-integration-test</phase> - <goals> - <goal>destroy</goal> - </goals> - <configuration> - <box>chef/centos-6.5</box> - <url>https://vagrantcloud.com/chef/centos-6.5</url> - <vagrantHome>${project.basedir}/src/test/resources/clusterts</vagrantHome> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-failsafe-plugin</artifactId> - <configuration> - <runOrder>alphabetical</runOrder> - <forkMode>pertest</forkMode> - <excludes> - <exclude>${failsafe.test.excludes}</exclude> - <exclude>${cluster.test.excludes}</exclude> - <exclude>${cluster.extest.excludes}</exclude> - </excludes> - </configuration> - <executions> - <execution> - <goals> - <goal>integration-test</goal> - <goal>verify</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> - - <dependencies> - <dependency> - <groupId>args4j</groupId> - <artifactId>args4j</artifactId> - </dependency> - <dependency> - <groupId>org.apache.zookeeper</groupId> - <artifactId>zookeeper</artifactId> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - </dependency> - <dependency> - <groupId>org.apache.asterix</groupId> - <artifactId>asterix-events</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.asterix</groupId> - <artifactId>asterix-common</artifactId> - <version>${project.version}</version> - <type>test-jar</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.asterix</groupId> - <artifactId>asterix-app</artifactId> - <version>${project.version}</version> - <type>test-jar</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.asterix</groupId> - <artifactId>asterix-server</artifactId> - <version>${project.version}</version> - <type>zip</type> - <classifier>binary-assembly</classifier> - </dependency> - <dependency> - <groupId>org.apache.asterix</groupId> - <artifactId>asterix-external-data</artifactId> - <version>${project.version}</version> - <type>test-jar</type> - </dependency> - <dependency> - <groupId>org.apache.asterix</groupId> - <artifactId>asterix-test-framework</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-common</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-minicluster</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-utils</artifactId> - <version>3.0.20</version> - </dependency> - <dependency> - <groupId>org.apache.asterix</groupId> - <artifactId>asterix-external-data</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.asterix</groupId> - <artifactId>asterix-common</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-lang3</artifactId> - </dependency> - <dependency> - <groupId>javax.xml.bind</groupId> - <artifactId>jaxb-api</artifactId> - </dependency> - <dependency> - <groupId>org.apache.hyracks</groupId> - <artifactId>hyracks-api</artifactId> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-hdfs</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.hyracks</groupId> - <artifactId>hyracks-util</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.asterix</groupId> - <artifactId>asterix-server</artifactId> - <type>test-jar</type> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.asterix</groupId> - <artifactId>asterix-external-data</artifactId> - <version>${project.version}</version> - <type>zip</type> - <classifier>testlib</classifier> - <scope>test</scope> - </dependency> - </dependencies> </project> http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-installer/src/main/assembly/binary-assembly.xml ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-installer/src/main/assembly/binary-assembly.xml b/asterixdb/asterix-installer/src/main/assembly/binary-assembly.xml deleted file mode 100644 index d53593a..0000000 --- a/asterixdb/asterix-installer/src/main/assembly/binary-assembly.xml +++ /dev/null @@ -1,147 +0,0 @@ -<!-- - ! 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. - !--> -<assembly> - <id>binary-assembly</id> - <formats> - <format>zip</format> - <format>dir</format> - </formats> - <includeBaseDirectory>false</includeBaseDirectory> - <fileSets> - <fileSet> - <directory>src/main/resources/conf</directory> - <outputDirectory>conf</outputDirectory> - </fileSet> - <fileSet> - <directory>src/main/resources/clusters</directory> - <outputDirectory>clusters</outputDirectory> - </fileSet> - <fileSet> - <directory>src/main/resources/examples</directory> - <outputDirectory>examples</outputDirectory> - </fileSet> - <fileSet> - <directory>src/main/resources/zookeeper</directory> - <fileMode>0755</fileMode> - <outputDirectory>.installer/zookeeper/bin</outputDirectory> - </fileSet> - <fileSet> - <directory>src/main/resources/scripts</directory> - <fileMode>0755</fileMode> - <includes> - <include>managix</include> - </includes> - <outputDirectory>bin</outputDirectory> - </fileSet> - <fileSet> - <directory>src/main/resources/scripts</directory> - <fileMode>0755</fileMode> - <excludes> - <exclude>managix</exclude> - </excludes> - <outputDirectory>.installer/scripts</outputDirectory> - </fileSet> - <fileSet> - <directory>src/main/resources/hadoop-0.20.2</directory> - <outputDirectory>.installer/hadoop-0.20.2</outputDirectory> - <fileMode>0755</fileMode> - </fileSet> - <fileSet> - <directory>target</directory> - <outputDirectory>lib</outputDirectory> - <includes> - <include>*.jar</include> - </includes> - </fileSet> - <fileSet> - <directory>target/generated-sources</directory> - <outputDirectory>.</outputDirectory> - <includes> - <include>LICENSE*</include> - <include>NOTICE*</include> - </includes> - </fileSet> - <fileSet> - <directory>../asterix-events/src/main/resources/events</directory> - <outputDirectory>.installer/events</outputDirectory> - <fileMode>0755</fileMode> - </fileSet> - </fileSets> - <dependencySets> - <dependencySet> - <includes> - <!-- NOTE! Any changes here must be mirrored in asterix-installer pom.xml for licensegen --> - <include>log4j:log4j</include> - <include>org.apache.asterix:asterix-events</include> - <include>org.apache.asterix:asterix-common</include> - <include>org.apache.commons:commons-lang3</include> - <include>org.apache.zookeeper:zookeeper</include> - <include>args4j:args4j</include> - <include>log4j:log4j</include> - <include>commons-io:commons-io</include> - <include>org.slf4j:slf4j-api</include> - <include>org.slf4j:slf4j-log4j12</include> - </includes> - <unpack>false</unpack> - <outputDirectory>lib</outputDirectory> - </dependencySet> - <dependencySet> - <includes> - <!-- NOTE! Any changes here must be mirrored in asterix-installer pom.xml for licensegen --> - <include>commons-cli:commons-cli</include> - <include>commons-logging:commons-logging</include> - </includes> - <unpack>false</unpack> - <outputDirectory>.installer/hadoop-0.20.2/lib</outputDirectory> - </dependencySet> - <dependencySet> - <includes> - <!-- NOTE! Any changes here must be mirrored in asterix-installer pom.xml for licensegen --> - <include>org.apache.zookeeper:zookeeper</include> - <include>log4j:log4j</include> - <include>org.slf4j:slf4j-api</include> - </includes> - <unpack>false</unpack> - <outputDirectory>.installer/zookeeper/lib</outputDirectory> - </dependencySet> - <dependencySet> - <outputDirectory>asterix</outputDirectory> - <includes> - <include>org.apache.asterix:asterix-server*</include> - </includes> - <useTransitiveDependencies>false</useTransitiveDependencies> - </dependencySet> - <dependencySet> - <outputDirectory>.installer/events</outputDirectory> - <includes> - <include>org.apache.asterix:asterix-events*</include> - </includes> - <unpack>false</unpack> - <useTransitiveDependencies>false</useTransitiveDependencies> - </dependencySet> - <dependencySet> - <outputDirectory>extlibs</outputDirectory> - <includes> - <include>org.apache.asterix:asterix-external-data:*:zip</include> - </includes> - <unpack>false</unpack> - <useTransitiveDependencies>false</useTransitiveDependencies> - </dependencySet> - </dependencySets> -</assembly> http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/AbstractCommand.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/AbstractCommand.java b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/AbstractCommand.java deleted file mode 100644 index 4ce37bd..0000000 --- a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/AbstractCommand.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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. - */ -package org.apache.asterix.installer.command; - -import org.apache.log4j.Logger; -import org.kohsuke.args4j.CmdLineParser; - -public abstract class AbstractCommand implements ICommand { - - protected static final Logger LOGGER = Logger.getLogger(AbstractCommand.class.getName()); - - protected CommandConfig config; - - protected String usageDescription; - - public void execute(String[] args) throws Exception { - String[] cmdArgs = new String[args.length - 1]; - System.arraycopy(args, 1, cmdArgs, 0, cmdArgs.length); - config = getCommandConfig(); - CmdLineParser parser = new CmdLineParser(config); - parser.parseArgument(cmdArgs); - execCommand(); - } - - abstract protected void execCommand() throws Exception; - - abstract protected String getUsageDescription(); - - abstract protected CommandConfig getCommandConfig(); -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/AlterCommand.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/AlterCommand.java b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/AlterCommand.java deleted file mode 100644 index 05e3b67..0000000 --- a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/AlterCommand.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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. - */ -package org.apache.asterix.installer.command; - -import java.util.Date; - -import org.kohsuke.args4j.Option; - -import org.apache.asterix.common.configuration.AsterixConfiguration; -import org.apache.asterix.event.model.AsterixInstance; -import org.apache.asterix.event.model.AsterixInstance.State; -import org.apache.asterix.event.service.AsterixEventServiceUtil; -import org.apache.asterix.event.service.ILookupService; -import org.apache.asterix.event.service.ServiceProvider; -import org.apache.asterix.installer.driver.InstallerDriver; -import org.apache.asterix.installer.driver.InstallerUtil; - -public class AlterCommand extends AbstractCommand { - - @Override - protected void execCommand() throws Exception { - InstallerDriver.initConfig(true); - String instanceName = ((AlterConfig) config).name; - AsterixEventServiceUtil.validateAsterixInstanceExists(instanceName, State.INACTIVE); - ILookupService lookupService = ServiceProvider.INSTANCE.getLookupService(); - AsterixInstance instance = ServiceProvider.INSTANCE.getLookupService().getAsterixInstance(instanceName); - AsterixEventServiceUtil.createClusterProperties(instance.getCluster(), instance.getAsterixConfiguration()); - AsterixConfiguration asterixConfiguration = InstallerUtil - .getAsterixConfiguration(((AlterConfig) config).confPath); - instance.setAsterixConfiguration(asterixConfiguration); - instance.setModifiedTimestamp(new Date()); - lookupService.updateAsterixInstance(instance); - LOGGER.info("Altered configuration settings for Asterix instance: " + instanceName); - - } - - @Override - protected CommandConfig getCommandConfig() { - return new AlterConfig(); - } - - @Override - protected String getUsageDescription() { - return "\nAlter the instance's configuration settings." - + "\nPrior to running this command, the instance is required to be INACTIVE state." - + "\nChanged configuration settings will be reflected when the instance is started." - + "\n\nAvailable arguments/options" + "\n-n name of the ASTERIX instance."; - } - -} - -class AlterConfig extends CommandConfig { - - @Option(name = "-n", required = true, usage = "Name of Asterix Instance") - public String name; - - @Option(name = "-a", required = true, usage = "Path to asterix instance configuration") - public String confPath; - -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java deleted file mode 100644 index 22b6952..0000000 --- a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/BackupCommand.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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. - */ -package org.apache.asterix.installer.command; - -import java.util.Date; -import java.util.List; - -import org.kohsuke.args4j.Option; - -import org.apache.asterix.event.model.AsterixInstance; -import org.apache.asterix.event.model.AsterixInstance.State; -import org.apache.asterix.event.model.BackupInfo; -import org.apache.asterix.event.schema.pattern.Patterns; -import org.apache.asterix.event.service.AsterixEventService; -import org.apache.asterix.event.service.AsterixEventServiceUtil; -import org.apache.asterix.event.service.ServiceProvider; -import org.apache.asterix.event.util.PatternCreator; -import org.apache.asterix.installer.driver.InstallerDriver; -import org.apache.asterix.installer.schema.conf.Backup; - -public class BackupCommand extends AbstractCommand { - - @Override - protected void execCommand() throws Exception { - InstallerDriver.initConfig(true); - String asterixInstanceName = ((BackupConfig) config).name; - AsterixInstance instance = AsterixEventServiceUtil.validateAsterixInstanceExists(asterixInstanceName, - State.INACTIVE); - List<BackupInfo> backupInfo = instance.getBackupInfo(); - Backup backupConf = AsterixEventService.getConfiguration().getBackup(); - Patterns patterns = PatternCreator.INSTANCE.getBackUpAsterixPattern(instance, backupConf); - AsterixEventService.getAsterixEventServiceClient(instance.getCluster()).submit(patterns); - int backupId = backupInfo.size(); - BackupInfo binfo = new BackupInfo(backupId, new Date(), backupConf); - backupInfo.add(binfo); - LOGGER.info(asterixInstanceName + " backed up " + binfo); - ServiceProvider.INSTANCE.getLookupService().updateAsterixInstance(instance); - } - - @Override - protected CommandConfig getCommandConfig() { - return new BackupConfig(); - } - - @Override - protected String getUsageDescription() { - return "\nThe backup command allows you to take a" - + "\nbackup of the data stored with an ASTERIX instance. " - + "\nThe backed up snapshot is stored either in HDFS or on the local file system of each node in the ASTERIX cluster." - + "\nThe target location of backup can be configured in $MANAGIX_HOME/conf/managix-conf.xml" - + "\n\nAvailable arguments/options:" + "\n-n name of the Asterix instance"; - - } - -} - -class BackupConfig extends CommandConfig { - - @Option(name = "-n", required = true, usage = "Name of the Asterix instance") - public String name; - -} http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/CommandConfig.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/CommandConfig.java b/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/CommandConfig.java deleted file mode 100644 index 4c07d4e..0000000 --- a/asterixdb/asterix-installer/src/main/java/org/apache/asterix/installer/command/CommandConfig.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * 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. - */ -package org.apache.asterix.installer.command; - -public abstract class CommandConfig { - -}
