You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2016/06/29 12:45:11 UTC
[01/38] usergrid git commit: Add docs for application delete and
restore.
Repository: usergrid
Updated Branches:
refs/heads/release-2.1.1 9c4b5242a -> 37c482c5e
refs/heads/usergrid-1268-akka-211 d12307bdb -> 639b421cd
Add docs for application delete and restore.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/cb90c0bb
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/cb90c0bb
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/cb90c0bb
Branch: refs/heads/release-2.1.1
Commit: cb90c0bb83ef9f6d0578dd92753d7a48ff73145a
Parents: cc7a867
Author: Dave Johnson <sn...@apache.org>
Authored: Mon Jun 6 16:42:34 2016 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Mon Jun 6 16:42:34 2016 -0400
----------------------------------------------------------------------
docs/orgs-and-apps/application.md | 104 +++++++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/cb90c0bb/docs/orgs-and-apps/application.md
----------------------------------------------------------------------
diff --git a/docs/orgs-and-apps/application.md b/docs/orgs-and-apps/application.md
index 801b9ef..f60f63f 100644
--- a/docs/orgs-and-apps/application.md
+++ b/docs/orgs-and-apps/application.md
@@ -98,3 +98,107 @@ Note: You also need to provide a valid access token with the API call. See [Auth
}
}
+
+## Deleting and restoring Applications
+Usergrid allows you to clean-up your Organizations by deleting old Applications that you no longer need.
+With this feature, Applications are not really deleted but they are hidden from view and may be restored later. (At some point in the future, Usergrid may get the ability to completely obliterate an Application, but that ability does not exist at the time of this writing.)
+
+### Delete Application: Request URI
+
+Only an authenticated Admin User can delete and restore Applications.
+To delete an application, you send an authenticated HTTP **DELETE** request to the /management end-point.
+The Request URI must specify the Organization and the Application, both by identifier (name or UUID).
+Here is the Request URI pattern:
+
+ /management/organizations|orgs/{org_name}|{uuid}/applications|apps/{app_name}
+
+Parameters
+
+This is intentionally redundant, but you must confirm that you really want to delete the Application
+by specifying its name or UUID, same as that which you used in the Request URI.
+
+Parameter Description
+--------- -----------
+string confirm_application_id Application identifier (either name or UUID)
+
+Note: You also need to provide a valid access token with the API call. See [Authenticating users and application clients](../security_and_auth/authenticating-users-and-application-clients.html) for details.
+
+
+### Delete Application: Example - Request
+
+This example deletes an aApplication named 'testapp1'
+
+ curl -X DELETE "https://api.usergrid.com/management/orgs/testorg/apps/testapp1?confirm_application_id=testapp1"
+
+### Delete Application: Example - Response
+
+The response echos back the action that was taken and the params, and an HTTP 200 OK status message confirms that the Application has been deleted.
+
+ HTTP/1.1 200 OK
+ Access-Control-Allow-Origin: *
+ Content-Length: 276
+ Content-Type: application/json
+ Date: Mon, 06 Jun 2016 18:52:04 GMT
+ Server: Apache-Coyote/1.1
+ Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 05-Jun-2016 18:52:04 GMT
+ {
+ "action": "delete",
+ "application": "d44dfc30-2c13-11e6-8b07-0a669fe1d66e",
+ "applicationName": "delete",
+ "duration": 3,
+ "organization": "test-organization",
+ "params": {
+ "confirm_application_identifier": [
+ "testapp1"
+ ]
+ },
+ "timestamp": 1465239124645
+ }
+
+
+### Restore Application: Request URI
+
+To Restore an Application that has been deleted you must know the Application's UUID. If you do a PUT to that application's old URI, using he UUID to identify it, then the Application will be restored.
+
+### Restore Application: Example - Request
+
+For example, to restore 'testapp1' that we deleted above:
+
+ curl -X PUT "https://api.usergrid.com/management/orgs/test-organization/apps/d44dfc30-2c13-11e6-8b07-0a669fe1d66e access_token==YWMtZR..."
+
+### Restore Application: Example - Response
+
+Here's the response that indicates via HTTP 200 OK that the Application has been restored.
+
+ HTTP/1.1 200 OK
+ Access-Control-Allow-Origin: *
+ Content-Length: 223
+ Content-Type: application/json
+ Date: Mon, 06 Jun 2016 19:03:16 GMT
+ Server: Apache-Coyote/1.1
+ Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 05-Jun-2016 19:03:16 GMT
+
+ {
+ "action": "restore",
+ "application": "d44dfc30-2c13-11e6-8b07-0a669fe1d66e",
+ "applicationName": "delete",
+ "duration": 3,
+ "organization": "test-organization",
+ "params": {},
+ "timestamp": 1465239796913
+ }
+
+### Application Delete and Restore Limitations
+
+At the time of this writing there are a couple of limitations regarding Application Delete and Restore:
+
+* Within an Organization, you cannot delete an Application with the same name as an Application that you have deleted before.
+* Within an Organization, you cannot restore an Application is an application with the very same name has been added since the orginal one was deleted.
+
+Hopefully, these unnecessary limitations will be fixed soon; they are tracked by this JIRA issue [USERGRID-1299](https://issues.apache.org/jira/browse/USERGRID-1299)
+
+
+
+
+
+
\ No newline at end of file
[07/38] usergrid git commit: Add Pivotal Cloud Foundry source for
creating Usergrid Tile ( CF deployment + bosh release )
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/config/blobs.yml
----------------------------------------------------------------------
diff --git a/deployment/pcf/config/blobs.yml b/deployment/pcf/config/blobs.yml
new file mode 100644
index 0000000..b05a48d
--- /dev/null
+++ b/deployment/pcf/config/blobs.yml
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+--- {}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/config/final.yml
----------------------------------------------------------------------
diff --git a/deployment/pcf/config/final.yml b/deployment/pcf/config/final.yml
new file mode 100644
index 0000000..784703c
--- /dev/null
+++ b/deployment/pcf/config/final.yml
@@ -0,0 +1,24 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+---
+blobstore:
+ provider: local
+ options:
+ blobstore_path: /tmp/usergrid-blobs
+final_name: usergrid_blobstore
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/content_migrations.yml
----------------------------------------------------------------------
diff --git a/deployment/pcf/content_migrations.yml b/deployment/pcf/content_migrations.yml
new file mode 100644
index 0000000..80035ff
--- /dev/null
+++ b/deployment/pcf/content_migrations.yml
@@ -0,0 +1,53 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+---
+product: apache-usergrid
+installation_version: '1.5'
+to_version: 0.1.1
+migrations:
+- from_version: 0.0.1
+ rules:
+ - type: update
+ selector: product_version
+ to: 0.1.1
+- from_version: 0.0.2
+ rules:
+ - type: update
+ selector: product_version
+ to: 0.1.1
+- from_version: 0.0.3
+ rules:
+ - type: update
+ selector: product_version
+ to: 0.1.1
+- from_version: 0.0.4
+ rules:
+ - type: update
+ selector: product_version
+ to: 0.1.1
+- from_version: 0.0.5
+ rules:
+ - type: update
+ selector: product_version
+ to: 0.1.1
+- from_version: 0.1.0
+ rules:
+ - type: update
+ selector: product_version
+ to: 0.1.1
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/createRelease.sh
----------------------------------------------------------------------
diff --git a/deployment/pcf/createRelease.sh b/deployment/pcf/createRelease.sh
new file mode 100755
index 0000000..e2c58bf
--- /dev/null
+++ b/deployment/pcf/createRelease.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+RELEASE_VERSION=2.1.0
+
+rm -rf dev_releases .dev_builds
+bosh create release --with-tarball --version $RELEASE_VERSION
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/createTile.sh
----------------------------------------------------------------------
diff --git a/deployment/pcf/createTile.sh b/deployment/pcf/createTile.sh
new file mode 100755
index 0000000..91db8f1
--- /dev/null
+++ b/deployment/pcf/createTile.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+TILE_METADATA_VERSION=1.6
+
+# Make sure docker-boshrelease-23.tgz tar ball is available
+
+mkdir -p product/metadata product/releases product/content_migrations # product/javascript-migrations
+cp dev_releases/apache*/apache*tgz product/releases
+cp docker-boshrelease-23.tgz product/releases
+cp apache-usergrid-tile-${TILE_METADATA_VERSION}.yml product/metadata/apache-usergrid.yml
+cp content_migrations.yml product/content_migrations
+cd product
+zip -r ../usergrid.pivotal *
+cd ..
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/jobs/delete-all/monit
----------------------------------------------------------------------
diff --git a/deployment/pcf/jobs/delete-all/monit b/deployment/pcf/jobs/delete-all/monit
new file mode 100644
index 0000000..bba851e
--- /dev/null
+++ b/deployment/pcf/jobs/delete-all/monit
@@ -0,0 +1,17 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/jobs/delete-all/spec
----------------------------------------------------------------------
diff --git a/deployment/pcf/jobs/delete-all/spec b/deployment/pcf/jobs/delete-all/spec
new file mode 100644
index 0000000..3165c6d
--- /dev/null
+++ b/deployment/pcf/jobs/delete-all/spec
@@ -0,0 +1,44 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+---
+name: delete-all
+templates:
+ delete-all.sh.erb: bin/run
+packages:
+- cf_cli
+- elasticsearch_docker
+- cassandra_docker
+- usergrid_app
+properties:
+ domain:
+ description: 'CloudFoundry system domain'
+ app_domains:
+ description: 'CloudFoundry application domains'
+ org:
+ description: 'Org for the Application'
+ default: ''
+ space:
+ description: 'Space for the Application'
+ default: ''
+ ssl.skip_cert_verify:
+ description: 'Whether to verify SSL certs when making web requests'
+ cf.admin_user:
+ description: 'Username of the CF admin user'
+ cf.admin_password:
+ description: 'Password of the CF admin user'
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/jobs/delete-all/templates/delete-all.sh.erb
----------------------------------------------------------------------
diff --git a/deployment/pcf/jobs/delete-all/templates/delete-all.sh.erb b/deployment/pcf/jobs/delete-all/templates/delete-all.sh.erb
new file mode 100644
index 0000000..9bd29ed
--- /dev/null
+++ b/deployment/pcf/jobs/delete-all/templates/delete-all.sh.erb
@@ -0,0 +1,131 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+export PATH="/var/vcap/packages/cf_cli/bin:$PATH"
+export CF=`which cf`
+
+function cf() {
+ echo cf "$@"
+ output=$($CF "$@" 2>&1)
+ result="$?"
+ if [ "$result" -ne "0" ]; then
+ echo "$output"
+ # No exit here - best effort continuation on failure for the delete script
+ fi
+}
+
+function is_true() {
+ equals_ignore_case "$1" "true"
+}
+
+function equals_ignore_case() {
+ echo "$1" | grep -i "^$2\$" >/dev/null
+}
+
+function import_opsmgr_variables() {
+ export SCHEME=https
+ export ADMIN_USER=<%= properties.cf.admin_user %>
+ export ADMIN_PASSWORD=<%= properties.cf.admin_password %>
+ export DOMAIN=<%= properties.domain %>
+ export APP_DOMAIN=<%= properties.app_domains[0] %>
+ export CF_ORG=<%= properties.org %>
+ export CF_SPACE=<%= properties.space %>
+ export CF_TARGET=$SCHEME://api.${DOMAIN}
+ export CF_SKIP_SSL=<%= properties.ssl.skip_cert_verify %>
+}
+
+function prepare_cf_cli {
+ export PATH="/var/vcap/packages/cf_cli/bin:$PATH"
+ export CF_HOME=`pwd`/home/cf
+ mkdir -p $CF_HOME
+}
+
+function authenticate() {
+ $CF --version
+ if is_true "$CF_SKIP_SSL"; then
+ cf api $CF_TARGET --skip-ssl-validation
+ else
+ cf api $CF_TARGET
+ fi
+ cf auth $ADMIN_USER $ADMIN_PASSWORD
+}
+
+function target_org() {
+ if [ -z "$CF_ORG" ]; then
+ CF_ORG=apache-usergrid-org
+ fi
+ cf target -o $CF_ORG >/dev/null
+}
+
+function target_space() {
+ if [ -z "$CF_SPACE" ]; then
+ CF_SPACE=apache-usergrid-space
+ fi
+ cf target -s $CF_SPACE >/dev/null
+}
+
+function delete_empty_space() {
+ output=`$CF apps | tail -1`
+ if [ "$output" == "No apps found" ]; then
+ cf delete-space -f $CF_SPACE
+ fi
+}
+
+function delete_empty_org() {
+ output=`$CF spaces | tail -1`
+ if [ "$output" == "No spaces found" ]; then
+ cf delete-org -f $CF_ORG
+ fi
+}
+
+function delete_all_versions() {
+ $CF apps | grep "$1-" | while read app rest; do
+ cf delete -f $app
+ done
+}
+
+function delete_service_broker() {
+ services=`$CF service-access | awk "/broker: $1/{flag=1;next}/broker: /{flag=0}flag" | egrep -v "access *orgs" | grep "." | awk '{print $1}' | uniq`
+ for service in $services; do
+ cf purge-service-offering -f "$service"
+ done
+ cf delete-service-broker -f $1
+}
+
+import_opsmgr_variables
+prepare_cf_cli
+authenticate
+if target_org; then
+ if target_space; then
+
+ # Delete package usergrid_app
+ #
+ delete_all_versions usergrid_app
+
+ # Delete package cassandra_docker
+ #
+
+ # Delete package elasticsearch_docker
+ #
+
+ delete_empty_space
+ fi
+ delete_empty_org
+fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/jobs/deploy-all/monit
----------------------------------------------------------------------
diff --git a/deployment/pcf/jobs/deploy-all/monit b/deployment/pcf/jobs/deploy-all/monit
new file mode 100644
index 0000000..1c19c35
--- /dev/null
+++ b/deployment/pcf/jobs/deploy-all/monit
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/jobs/deploy-all/spec
----------------------------------------------------------------------
diff --git a/deployment/pcf/jobs/deploy-all/spec b/deployment/pcf/jobs/deploy-all/spec
new file mode 100644
index 0000000..96bd3e7
--- /dev/null
+++ b/deployment/pcf/jobs/deploy-all/spec
@@ -0,0 +1,145 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+---
+name: deploy-all
+templates:
+ deploy-all.sh.erb: bin/run
+packages:
+ - cf_cli
+ - elasticsearch_docker
+ - cassandra_docker
+ - usergrid_app
+properties:
+ domain:
+ description: 'CloudFoundry system domain'
+ app_domains:
+ description: 'CloudFoundry application domains'
+ org:
+ description: 'Org for the Application'
+ default: ''
+ space:
+ description: 'Space for the Application'
+ default: ''
+ ssl.skip_cert_verify:
+ description: 'Whether to verify SSL certs when making web requests'
+ cf.admin_user:
+ description: 'Username of the CF admin user'
+ cf.admin_password:
+ description: 'Password of the CF admin user'
+ org_quota:
+ description: 'Org Memory Quota for the Application'
+ default: 1024
+ apply_open_security_group:
+ description: 'Open security group for the app to access outside'
+ default: true
+ security.user:
+ description: 'Basic auth user'
+ security.password:
+ description: 'Basic auth password'
+
+ elasticsearch.client.type:
+ description: 'The NODE or TRANSPORT type of client for connecting to ES'
+ default: 'TRANSPORT'
+
+ elasticsearch.hosts:
+ description: 'test'
+
+ cassandra.hosts:
+ description: 'test'
+
+ usergrid_app.name:
+ description: 'Name of package'
+
+ usergrid.cluster_name:
+ description: 'test'
+ default: 'usergrid'
+
+ usergrid.tomcat_instances:
+ description: number of instances
+ default: 1
+
+ usergrid.sysadmin.approve.users:
+ description: 'test'
+ default: false
+
+ usergrid.sysadmin.approve.organizations:
+ description: 'test'
+ default: false
+
+ usergrid.sysadmin.login.name:
+ description: 'test'
+
+ usergrid.sysadmin.login.email:
+ description: 'test'
+ default: 'superuser@usergrid.com'
+
+ usergrid.sysadmin.login.password:
+ description: 'test'
+
+ usergrid.sysadmin.login.allowed:
+ description: 'true'
+ default: true
+
+ usergrid.setup_test_account:
+ description: 'test'
+ default: true
+
+ usergrid.test_account.app:
+ description: 'test'
+ default: test-app
+
+ usergrid.test_account.organization:
+ description: 'test'
+ default: test-organization
+
+ usergrid.test_account.admin_user.username:
+ description: 'test'
+ default: 'test'
+
+ usergrid.test_account.admin_user.name:
+ description: 'test'
+ default: 'Test User'
+
+ usergrid.test_account.admin_user.email:
+ description: 'test'
+ default: 'user@usergrid.com'
+
+ usergrid.test_account.admin_user.password:
+ description: 'test'
+ default: 'test'
+
+ mail.smtps.host:
+ description: 'test'
+ default: 'test'
+
+ mail.smtps.port:
+ description: 'test'
+ default: 'test'
+
+ mail.smtps.auth:
+ description: 'test'
+ default: false
+
+ mail.smtps.username:
+ description: 'test'
+ default: 'test'
+
+ mail.smtps.password:
+ description: 'test'
+ default: 'test'
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/jobs/deploy-all/templates/deploy-all.sh.erb
----------------------------------------------------------------------
diff --git a/deployment/pcf/jobs/deploy-all/templates/deploy-all.sh.erb b/deployment/pcf/jobs/deploy-all/templates/deploy-all.sh.erb
new file mode 100644
index 0000000..b4208f3
--- /dev/null
+++ b/deployment/pcf/jobs/deploy-all/templates/deploy-all.sh.erb
@@ -0,0 +1,384 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+export PATH="/var/vcap/packages/cf_cli/bin:$PATH"
+export CF=`which cf`
+
+function cf() {
+ echo cf "$@"
+ output=$($CF "$@" 2>&1)
+ result="$?"
+ if [ "$result" -ne "0" ]; then
+ echo "$output"
+ exit $result
+ fi
+}
+
+function is_true() {
+ equals_ignore_case "$1" "true"
+}
+
+function equals_ignore_case() {
+ echo "$1" | grep -i "^$2\$" >/dev/null
+}
+
+function import_opsmgr_variables() {
+ export SCHEME=https
+ export ADMIN_USER=<%= properties.cf.admin_user %>
+ export ADMIN_PASSWORD=<%= properties.cf.admin_password %>
+ export DOMAIN=<%= properties.domain %>
+ export APP_DOMAIN=<%= properties.app_domains[0] %>
+ export CF_ORG=<%= properties.org %>
+ export CF_ORG_QUOTA=<%= properties.org_quota %>
+ export CF_SPACE=<%= properties.space %>
+ export CF_TARGET=$SCHEME://api.${DOMAIN}
+ export CF_SKIP_SSL=<%= properties.ssl.skip_cert_verify %>
+ export SECURITY_USER_NAME=<%= properties.security.user %>
+ export SECURITY_USER_PASSWORD=<%= properties.security.password %>
+ export APPLY_OPEN_SECURITY_GROUP=<%= properties.apply_open_security_group %>
+}
+
+function prepare_cf_cli {
+ export PATH="/var/vcap/packages/cf_cli/bin:$PATH"
+ export CF_HOME=`pwd`/home/cf
+ mkdir -p $CF_HOME
+}
+
+function authenticate() {
+ $CF --version
+ if is_true "$CF_SKIP_SSL"; then
+ cf api $CF_TARGET --skip-ssl-validation
+ else
+ cf api $CF_TARGET
+ fi
+ cf auth $ADMIN_USER $ADMIN_PASSWORD
+}
+
+function setup_target_org() {
+ if [ -z "$CF_ORG" ]; then
+ CF_ORG=apache-usergrid-org
+ fi
+ if ! $CF org $CF_ORG >/dev/null; then
+ cf create-org $CF_ORG
+ fi
+ cf target -o $CF_ORG
+}
+
+function setup_org_quota() {
+ if [ -n "$CF_ORG_QUOTA" ]; then
+ export CF_QUOTA=${CF_ORG}-quota
+ if ! $CF quota $CF_QUOTA >/dev/null; then
+ cf create-quota $CF_QUOTA -m ${CF_ORG_QUOTA}m -r 10 -s 10
+ fi
+ cf update-quota $CF_QUOTA -m ${CF_ORG_QUOTA}m -r 10 -s 10 --disallow-paid-service-plans
+ cf set-quota $CF_ORG $CF_QUOTA
+ fi
+}
+
+function setup_target_space() {
+ if [ -z "$CF_SPACE" ]; then
+ CF_SPACE=apache-usergrid-space
+ fi
+ if ! $CF space $CF_SPACE >/dev/null; then
+ cf create-space $CF_SPACE
+ fi
+ cf target -s $CF_SPACE
+}
+
+function add_target_org_to_admin() {
+
+ SYSTEM_ORG_GUID=`$CF org system --guid`
+ NEW_ORG_GUID=`$CF org $CF_ORG --guid`
+
+ ADMIN_GUID=`$CF curl /v2/organizations/$SYSTEM_ORG_GUID/users | grep -A 2 "username\": \"admin" | awk '{print $2}' | grep organizations | awk -F '/' '{print $4 }' `
+
+ $CF curl /v2/users/$ADMIN_GUID/organizations/$NEW_ORG_GUID -X PUT >/dev/null
+ $CF curl /v2/users/$ADMIN_GUID/managed_organizations/$NEW_ORG_GUID -X PUT >/dev/null
+}
+
+function setup_package_path() {
+ if [ -z "$PACKAGE_PATH" ]; then
+ export PACKAGE_PATH=/var/vcap/packages
+ fi
+}
+
+function apply_open_security_group() {
+ if ! is_true "$1"; then
+ return
+ fi
+ if ! $CF security-group all_open >/dev/null; then
+ cf create-security-group all_open $PACKAGE_PATH/templates/all_open.json
+ fi
+ cf bind-running-security-group all_open
+}
+
+function add_env_vars() {
+ cf set-env $1 UAA_HOST "$SCHEME://uaa.$DOMAIN"
+ cf set-env $1 CC_HOST "$CF_TARGET"
+ cf set-env $1 LOGIN_HOST "$SCHEME://login.$DOMAIN"
+ cf set-env $1 ROOT "\$HOME"
+ cf set-env $1 SCHEME "$SCHEME"
+ cf set-env $1 VERIFY_SSL "$CF_SKIP_SSL"
+
+ # Adding additional properties that most spring based apps or internal apps seem to be expecting
+ cf set-env $1 CF_ORG "$CF_ORG"
+ cf set-env $1 CF_SPACE "$CF_SPACE"
+ cf set-env $1 CF_TARGET "$CF_TARGET"
+ cf set-env $1 SECURITY_USER_NAME "$SECURITY_USER_NAME"
+ cf set-env $1 SECURITY_USER_PASSWORD "$SECURITY_USER_PASSWORD"
+ cf set-env $1 JBP_CONFIG_TOMCAT "{ tomcat: { version: 7.0.62 }}"
+
+ es_hosts_json="<%= properties.elasticsearch.hosts %>"
+ ca_hosts_json="<%= properties.cassandra.hosts%>"
+
+ export ES_HOSTS=`echo $es_hosts_json | sed -e 's#\[##;s#\]##'`
+ export CA_HOSTS=`echo $ca_hosts_json | sed -e 's#\[##;s#\]##'`
+
+ cf set-env $1 elasticsearch.hosts "$ES_HOSTS"
+ cf set-env $1 cassandra.url "$CA_HOSTS"
+
+ export elasticsearch_client_type="<%= properties.elasticsearch.client.type%>"
+ export cluster_name="<%= properties.usergrid.cluster_name%>"
+ export approve_users="<%= properties.usergrid.sysadmin.approve.users%>"
+ export approve_organizations="<%= properties.usergrid.sysadmin.approve.organizations%>"
+ export login_name="<%= properties.usergrid.sysadmin.login.name%>"
+ export login_email="<%= properties.usergrid.sysadmin.login.email%>"
+ export login_password="<%= properties.usergrid.sysadmin.login.password%>"
+ export login_allowed="<%= properties.usergrid.sysadmin.login.allowed%>"
+ export setup_test_account="<%= properties.usergrid.setup_test_account%>"
+ export test_account_app="<%= properties.usergrid.test_account.app%>"
+ export test_account_organization="<%= properties.usergrid.test_account.organization%>"
+ export test_account_admin_user_username="<%= properties.usergrid.test_account.admin_user.username%>"
+ export test_account_admin_user_name="<%= properties.usergrid.test_account.admin_user.name%>"
+ export test_account_admin_user_email="<%= properties.usergrid.test_account.admin_user.email%>"
+ export test_account_admin_user_password="<%= properties.usergrid.test_account.admin_user.password%>"
+ export smtps_host="<%= properties.mail.smtps.host%>"
+ export smtps_port="<%= properties.mail.smtps.port%>"
+ export smtps_auth="<%= properties.mail.smtps.auth%>"
+ export smtps_username="<%= properties.mail.smtps.username%>"
+ export smtps_password="<%= properties.mail.smtps.password%>"
+
+ cf set-env $1 JAVA_OPTS " -Dcassandra.url=$CA_HOSTS -Delasticsearch.hosts=$ES_HOSTS \
+ -Delasticsearch.client.type=$elasticsearch_client_type -Dusergrid.cluster_name=$cluster_name \
+ -Dmail.smtps.auth=$smtps_auth -Dmail.smtps.host=$smtps_host -Dmail.smtps.password=$smtps_password \
+ -Dmail.smtps.port=$smtps_port -Dmail.smtps.username=$smtps_username \
+ -Dusergrid.setup-test-account=$setup_test_account -Dusergrid.sysadmin.approve.organizations=$approve_organizations \
+ -Dusergrid.sysadmin.approve.users=approve_users -Dusergrid.sysadmin.login.allowed=true \
+ -Dusergrid.sysadmin.login.email=$login_email -Dusergrid.sysadmin.login.name=$login_name \
+ -Dusergrid.sysadmin.login.password=$login_password -Dusergrid.test-account.admin-user.email=baasadmins+pcf@apigee.com \
+ -Dusergrid.test-account.admin-user.name=\"$test_account_admin_user_name\" -Dusergrid.test-account.admin-user.password=test \
+ -Dusergrid.test-account.admin-user.username=$test_account_admin_user_username -Dusergrid.test-account.app=$test_account_app \
+ -Dusergrid.test-account.organization=$test_account_organization"
+
+ # Dynamic plans (if defined)
+
+ # Custom variables from tile.yml
+}
+
+function add_cf_credentials() {
+ cf set-env $1 CF_ADMIN_USER "$ADMIN_USER"
+ cf set-env $1 CF_ADMIN_USERNAME "$ADMIN_USER"
+ cf set-env $1 CF_ADMIN_PASSWORD "$ADMIN_PASSWORD"
+}
+
+function delete_older_versions() {
+ PKG_NAME="$1"
+ APP_NAME="$2"
+ $CF apps | grep "$PKG_NAME" | grep -v "$APP_NAME" | while read app rest; do
+ cf delete -f $app
+ done
+}
+
+function wait_till_running() {
+
+ for i in `seq 1 15`; do
+ CF_TRACE=true $CF app "$1" | grep RUNNING | grep "$1" >/dev/null
+ if [ "$?" -ne "0" ]; then
+ sleep 30
+ echo "cf app $1 # waiting for running state"
+ else
+ break
+ fi
+ done
+}
+
+function bootstrap_usergrid() {
+
+ echo "App is running, attempting Usergrid /system/database/setup"
+ echo " These calls do the following"
+ echo "1) Create the cassandra keyspace"
+ echo "2) Initialize the ElasticSearch indexes"
+ echo "3) Check the status"
+ echo ""
+
+ ug_db_setup=`curl -k -X PUT https://${APP_HOST}.${APP_DOMAIN}/system/database/setup -u ${login_name}:${login_password}`
+ echo "setup output: $ug_db_setup"
+
+ echo "App is running, Usergrid /system/database/setup finished, attempting Usergrid /system/database/bootstrap"
+ ug_db_bootstrap=`curl -k -X PUT https://${APP_HOST}.${APP_DOMAIN}/system/database/bootstrap -u ${login_name}:${login_password}`
+ echo "boostrap output: $ug_db_bootstrap"
+
+ ug_db_status=`curl -k https://${APP_HOST}.${APP_DOMAIN}/status -u ${login_name}:${login_password}`
+ echo "Status: $ug_db_status"
+ echo "Usergrid Bootstrap complete!!"
+ echo ""
+}
+
+function deploy_app() {
+ PKG_NAME="$1"
+ APP_NAME="$2"
+ APP_HOST="$3"
+ DOCKER_IMAGE="$4"
+ NEEDS_CF_CREDS="$5"
+ HEALTH_CHECK="$6"
+ AUTO_SERVICES="$7"
+
+ TOMCAT_INSTANCES="<%= properties.usergrid.tomcat_instances%>"
+
+ cf push ${APP_NAME} -n ${APP_HOST} -d ${APP_DOMAIN} \
+ ${DOCKER_IMAGE} -f $PACKAGE_PATH/${PKG_NAME}/manifest.yml -b https://github.com/cloudfoundry/java-buildpack \
+ -i $TOMCAT_INSTANCES --no-start
+
+ add_env_vars ${APP_NAME}
+ if is_true "$NEEDS_CF_CREDS"; then
+ add_cf_credentials ${APP_NAME}
+ fi
+ if [ -n "$HEALTH_CHECK" ]; then
+ cf set-health-check ${APP_NAME} "$HEALTH_CHECK"
+ fi
+ provision_auto_services ${PKG_NAME} ${APP_NAME} ${AUTO_SERVICES}
+ cf start ${APP_NAME}
+ wait_till_running ${APP_NAME}
+ bootstrap_usergrid
+ delete_older_versions ${PKG_NAME} ${APP_NAME}
+}
+
+function provision_auto_services() {
+ PKG_NAME="$1"
+ APP_NAME="$2"
+ shift; shift
+ for service in $*; do
+ if equals_ignore_case "$service" "none"; then
+ continue
+ fi
+ $CF services | grep ${PKG_NAME}-$service >/dev/null
+ if [ "$?" -ne "0" ]; then
+ plan=`$CF marketplace | grep $service | awk '{ print $2 }' | sed 's/,//g'`
+ if [ -n "$plan" ]; then
+ cf create-service $service $plan ${PKG_NAME}-$service
+ else
+ echo "no service matching" $service "in marketplace"
+ exit 1
+ fi
+ fi
+ cf bind-service ${APP_NAME} ${PKG_NAME}-$service
+ done
+}
+
+function register_broker() {
+ BROKER_NAME="$1"
+ BROKER_USER="$2"
+ BROKER_PASS="$3"
+ BROKER_URL="$4"
+ GLOBAL_ACCESS="$5"
+ BROKER_SERVICES="$6"
+ $CF service-brokers | grep $BROKER_NAME >/dev/null
+ if [ "$?" -ne "0" ]; then
+ cf create-service-broker "$BROKER_NAME" "$BROKER_USER" "$BROKER_PASS" "$BROKER_URL"
+ else
+ cf update-service-broker "$BROKER_NAME" "$BROKER_USER" "$BROKER_PASS" "$BROKER_URL"
+ fi
+ if is_true "$GLOBAL_ACCESS"; then
+ publicize_services "$BROKER_NAME" "$BROKER_SERVICES"
+ fi
+}
+
+function publicize_services() {
+ BROKER_NAME="$1"
+ BROKER_SERVICES="$2"
+ services_url=`$CF curl /v2/services?q=label:$BROKER_NAME | grep service_plans_url | awk '{ print $2 }' | sed 's/[",]//g'`
+ if [ -n "$services_url" ]; then
+ services=`$CF curl $services_url | grep "\"url\"" | awk '{ print $2 }' | sed 's/[",]//g'`
+ for service in $services; do
+ cf curl $service -X PUT -d '{"public": true}'
+ done
+ elif [ -n "$BROKER_SERVICES" ] && [ "$BROKER_SERVICES" != "INTERNAL_SERVICE_NAME" ]; then
+ # Rely on the internal plan names if we cannot get it from the /v2/services on the broker
+ for service_name in `echo "$BROKER_SERVICES" | sed -e 's/,/ /g;s/;/ /g'`
+ do
+ cf enable-service-access $service_name
+ done
+ else
+ services=`$CF service-access | awk "/broker: ${BROKER_NAME}/{flag=1;next}/broker: /{flag=0}flag" | egrep -v "access *orgs" | grep "." | awk '{print $1}' | uniq `
+ for service_name in $services; do
+ cf enable-service-access $service_name
+ done
+ fi
+}
+
+function push_buildpack() {
+ BUILDPACK_NAME="$1"
+ BUILDPACK_ORDER="$2"
+ BUILDPACK_FILE="$3"
+ $CF buildpacks | grep ${BUILDPACK_NAME} >/dev/null
+ if [ "$?" -eq "0" ]; then
+ cf update-buildpack $BUILDPACK_NAME -p $BUILDPACK_FILE --enable
+ else
+ cf create-buildpack $BUILDPACK_NAME $BUILDPACK_FILE $BUILDPACK_ORDER --enable
+ fi
+}
+
+import_opsmgr_variables
+prepare_cf_cli
+authenticate
+setup_target_org
+setup_org_quota
+setup_target_space
+add_target_org_to_admin
+setup_package_path
+apply_open_security_group "$APPLY_OPEN_SECURITY_GROUP"
+
+# Deploy package elasticsearch_docker
+#
+
+
+
+
+# Deploy package cassandra_docker
+#
+
+
+
+
+# Deploy package usergrid_app
+#
+
+export PKG_NAME=usergrid_app
+export APP_NAME=usergrid_app-0.1.0
+export APP_HOST=usergrid_app
+export DOCKER_IMAGE=""
+export NEEDS_CF_CREDS=""
+export HEALTH_CHECK=""
+export AUTO_SERVICES=""
+export AUTO_SERVICES="${AUTO_SERVICES} <%= properties.usergrid_app.persistence_store_type %>"
+deploy_app "$PKG_NAME" "$APP_NAME" "$APP_HOST" "$DOCKER_IMAGE" "$NEEDS_CF_CREDS" "$HEALTH_CHECK" "$AUTO_SERVICES"
+
+
+
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/jobs/docker-bosh-cassandra_docker/monit
----------------------------------------------------------------------
diff --git a/deployment/pcf/jobs/docker-bosh-cassandra_docker/monit b/deployment/pcf/jobs/docker-bosh-cassandra_docker/monit
new file mode 100644
index 0000000..39b40e3
--- /dev/null
+++ b/deployment/pcf/jobs/docker-bosh-cassandra_docker/monit
@@ -0,0 +1,23 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+check process docker-bosh-cassandra_docker
+ with pidfile /var/vcap/sys/run/docker-bosh-cassandra_docker/docker-bosh-cassandra_docker.pid
+ start program "/var/vcap/jobs/docker-bosh-cassandra_docker/bin/docker-bosh-cassandra_docker_ctl start"
+ stop program "/var/vcap/jobs/docker-bosh-cassandra_docker/bin/docker-bosh-cassandra_docker_ctl stop"
+ group vcap
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/jobs/docker-bosh-cassandra_docker/spec
----------------------------------------------------------------------
diff --git a/deployment/pcf/jobs/docker-bosh-cassandra_docker/spec b/deployment/pcf/jobs/docker-bosh-cassandra_docker/spec
new file mode 100644
index 0000000..ed998e7
--- /dev/null
+++ b/deployment/pcf/jobs/docker-bosh-cassandra_docker/spec
@@ -0,0 +1,26 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+---
+name: docker-bosh-cassandra_docker
+templates:
+ docker-bosh-cassandra_docker.sh.erb: bin/docker-bosh-cassandra_docker_ctl
+packages:
+- cassandra_docker
+- common
+properties: {}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/jobs/docker-bosh-cassandra_docker/templates/docker-bosh-cassandra_docker.sh.erb
----------------------------------------------------------------------
diff --git a/deployment/pcf/jobs/docker-bosh-cassandra_docker/templates/docker-bosh-cassandra_docker.sh.erb b/deployment/pcf/jobs/docker-bosh-cassandra_docker/templates/docker-bosh-cassandra_docker.sh.erb
new file mode 100644
index 0000000..5669dda
--- /dev/null
+++ b/deployment/pcf/jobs/docker-bosh-cassandra_docker/templates/docker-bosh-cassandra_docker.sh.erb
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+set -e # exit immediately if a simple command exits with a non-zero status
+set -u # report the usage of uninitialized variables
+
+# Setup env vars and folders
+RUN_DIR=/var/vcap/sys/run/docker-bosh-cassandra_docker
+LOG_DIR=/var/vcap/sys/log/docker-bosh-cassandra_docker
+PACKAGES_DIR=/var/vcap/packages/cassandra_docker
+
+PIDFILE=$RUN_DIR/docker-bosh-cassandra_docker.pid
+
+source /var/vcap/packages/common/utils.sh
+
+case $1 in
+
+ start)
+ pid_guard $PIDFILE docker-bosh-cassandra_docker
+
+ mkdir -p $RUN_DIR
+ mkdir -p $LOG_DIR
+
+ chown vcap:vcap $RUN_DIR
+ chown -R vcap:vcap $LOG_DIR
+
+ echo $$ > $PIDFILE
+ chown vcap:vcap $PIDFILE
+
+ for image in $PACKAGES_DIR/*.tgz; do
+ /var/vcap/packages/docker/bin/docker \
+ --host unix:///var/vcap/sys/run/docker/docker.sock \
+ load -i $image \
+ >>$LOG_DIR/docker-bosh-cassandra_docker.stdout.log \
+ 2>>$LOG_DIR/docker-bosh-cassandra_docker.stderr.log
+ done
+
+ # do nothing forever
+ exec tail -f /dev/null
+ ;;
+
+ stop)
+ kill_and_wait $PIDFILE
+
+ ;;
+ *)
+ echo "Usage: docker-bosh-cassandra_docker_ctl {start|stop}"
+
+ ;;
+
+esac
+exit 0
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/jobs/docker-bosh-elasticsearch_docker/monit
----------------------------------------------------------------------
diff --git a/deployment/pcf/jobs/docker-bosh-elasticsearch_docker/monit b/deployment/pcf/jobs/docker-bosh-elasticsearch_docker/monit
new file mode 100644
index 0000000..1846260
--- /dev/null
+++ b/deployment/pcf/jobs/docker-bosh-elasticsearch_docker/monit
@@ -0,0 +1,23 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+check process docker-bosh-elasticsearch_docker
+ with pidfile /var/vcap/sys/run/docker-bosh-elasticsearch_docker/docker-bosh-elasticsearch_docker.pid
+ start program "/var/vcap/jobs/docker-bosh-elasticsearch_docker/bin/docker-bosh-elasticsearch_docker_ctl start"
+ stop program "/var/vcap/jobs/docker-bosh-elasticsearch_docker/bin/docker-bosh-elasticsearch_docker_ctl stop"
+ group vcap
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/jobs/docker-bosh-elasticsearch_docker/spec
----------------------------------------------------------------------
diff --git a/deployment/pcf/jobs/docker-bosh-elasticsearch_docker/spec b/deployment/pcf/jobs/docker-bosh-elasticsearch_docker/spec
new file mode 100644
index 0000000..7f66165
--- /dev/null
+++ b/deployment/pcf/jobs/docker-bosh-elasticsearch_docker/spec
@@ -0,0 +1,26 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+---
+name: docker-bosh-elasticsearch_docker
+templates:
+ docker-bosh-elasticsearch_docker.sh.erb: bin/docker-bosh-elasticsearch_docker_ctl
+packages:
+- elasticsearch_docker
+- common
+properties: {}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/jobs/docker-bosh-elasticsearch_docker/templates/docker-bosh-elasticsearch_docker.sh.erb
----------------------------------------------------------------------
diff --git a/deployment/pcf/jobs/docker-bosh-elasticsearch_docker/templates/docker-bosh-elasticsearch_docker.sh.erb b/deployment/pcf/jobs/docker-bosh-elasticsearch_docker/templates/docker-bosh-elasticsearch_docker.sh.erb
new file mode 100644
index 0000000..2f3bab7
--- /dev/null
+++ b/deployment/pcf/jobs/docker-bosh-elasticsearch_docker/templates/docker-bosh-elasticsearch_docker.sh.erb
@@ -0,0 +1,69 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+set -e # exit immediately if a simple command exits with a non-zero status
+set -u # report the usage of uninitialized variables
+
+# Setup env vars and folders
+RUN_DIR=/var/vcap/sys/run/docker-bosh-elasticsearch_docker
+LOG_DIR=/var/vcap/sys/log/docker-bosh-elasticsearch_docker
+PACKAGES_DIR=/var/vcap/packages/elasticsearch_docker
+
+PIDFILE=$RUN_DIR/docker-bosh-elasticsearch_docker.pid
+
+source /var/vcap/packages/common/utils.sh
+
+case $1 in
+
+ start)
+ pid_guard $PIDFILE docker-bosh-elasticsearch_docker
+
+ mkdir -p $RUN_DIR
+ mkdir -p $LOG_DIR
+
+ chown vcap:vcap $RUN_DIR
+ chown -R vcap:vcap $LOG_DIR
+
+ echo $$ > $PIDFILE
+ chown vcap:vcap $PIDFILE
+
+ for image in $PACKAGES_DIR/*.tgz; do
+ /var/vcap/packages/docker/bin/docker \
+ --host unix:///var/vcap/sys/run/docker/docker.sock \
+ load -i $image \
+ >>$LOG_DIR/docker-bosh-elasticsearch_docker.stdout.log \
+ 2>>$LOG_DIR/docker-bosh-elasticsearch_docker.stderr.log
+ done
+
+ # do nothing forever
+ exec tail -f /dev/null
+ ;;
+
+ stop)
+ kill_and_wait $PIDFILE
+
+ ;;
+ *)
+ echo "Usage: docker-bosh-elasticsearch_docker_ctl {start|stop}"
+
+ ;;
+
+esac
+exit 0
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/packages/cassandra_docker/packaging
----------------------------------------------------------------------
diff --git a/deployment/pcf/packages/cassandra_docker/packaging b/deployment/pcf/packages/cassandra_docker/packaging
new file mode 100644
index 0000000..2b1f9d5
--- /dev/null
+++ b/deployment/pcf/packages/cassandra_docker/packaging
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+# abort script on any command that exit with a non zero value
+set -e
+
+cp -r templates ${BOSH_INSTALL_TARGET}
+
+cp cassandra_docker/cassandra-2.1.tgz ${BOSH_INSTALL_TARGET}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/packages/cassandra_docker/spec
----------------------------------------------------------------------
diff --git a/deployment/pcf/packages/cassandra_docker/spec b/deployment/pcf/packages/cassandra_docker/spec
new file mode 100644
index 0000000..17cc214
--- /dev/null
+++ b/deployment/pcf/packages/cassandra_docker/spec
@@ -0,0 +1,26 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+---
+name: cassandra_docker
+
+dependencies: []
+
+files:
+- templates/all_open.json
+- cassandra_docker/cassandra-2.1.tgz
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/packages/cf_cli/packaging
----------------------------------------------------------------------
diff --git a/deployment/pcf/packages/cf_cli/packaging b/deployment/pcf/packages/cf_cli/packaging
new file mode 100644
index 0000000..b2c38ba
--- /dev/null
+++ b/deployment/pcf/packages/cf_cli/packaging
@@ -0,0 +1,26 @@
+#! /bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+set -e
+
+mkdir -p ${BOSH_INSTALL_TARGET}/bin
+cd cf_cli
+tar zxvf cf-linux-amd64.tgz
+cp cf ${BOSH_INSTALL_TARGET}/bin/
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/packages/cf_cli/spec
----------------------------------------------------------------------
diff --git a/deployment/pcf/packages/cf_cli/spec b/deployment/pcf/packages/cf_cli/spec
new file mode 100644
index 0000000..f9bc92b
--- /dev/null
+++ b/deployment/pcf/packages/cf_cli/spec
@@ -0,0 +1,25 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+---
+name: cf_cli
+
+dependencies: []
+
+files:
+- cf_cli/cf-linux-amd64.tgz
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/packages/common/packaging
----------------------------------------------------------------------
diff --git a/deployment/pcf/packages/common/packaging b/deployment/pcf/packages/common/packaging
new file mode 100644
index 0000000..7ca503a
--- /dev/null
+++ b/deployment/pcf/packages/common/packaging
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+set -e -x
+
+cp -a common/* ${BOSH_INSTALL_TARGET}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/packages/common/spec
----------------------------------------------------------------------
diff --git a/deployment/pcf/packages/common/spec b/deployment/pcf/packages/common/spec
new file mode 100644
index 0000000..ad325c9
--- /dev/null
+++ b/deployment/pcf/packages/common/spec
@@ -0,0 +1,25 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+---
+name: common
+
+dependencies: []
+
+files:
+- common/*
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/packages/elasticsearch_docker/packaging
----------------------------------------------------------------------
diff --git a/deployment/pcf/packages/elasticsearch_docker/packaging b/deployment/pcf/packages/elasticsearch_docker/packaging
new file mode 100644
index 0000000..a1306d1
--- /dev/null
+++ b/deployment/pcf/packages/elasticsearch_docker/packaging
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+# abort script on any command that exit with a non zero value
+set -e
+
+cp -r templates ${BOSH_INSTALL_TARGET}
+
+cp elasticsearch_docker/elasticsearch-1.7.tgz ${BOSH_INSTALL_TARGET}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/packages/elasticsearch_docker/spec
----------------------------------------------------------------------
diff --git a/deployment/pcf/packages/elasticsearch_docker/spec b/deployment/pcf/packages/elasticsearch_docker/spec
new file mode 100644
index 0000000..4a553ab
--- /dev/null
+++ b/deployment/pcf/packages/elasticsearch_docker/spec
@@ -0,0 +1,26 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+---
+name: elasticsearch_docker
+
+dependencies: []
+
+files:
+- templates/all_open.json
+- elasticsearch_docker/elasticsearch-1.7.tgz
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/packages/usergrid_app/packaging
----------------------------------------------------------------------
diff --git a/deployment/pcf/packages/usergrid_app/packaging b/deployment/pcf/packages/usergrid_app/packaging
new file mode 100644
index 0000000..586922b
--- /dev/null
+++ b/deployment/pcf/packages/usergrid_app/packaging
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+# abort script on any command that exit with a non zero value
+set -e
+
+cp -r templates ${BOSH_INSTALL_TARGET}
+
+cp usergrid_app/ROOT.war ${BOSH_INSTALL_TARGET}
+cp usergrid_app/manifest.yml ${BOSH_INSTALL_TARGET}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/packages/usergrid_app/spec
----------------------------------------------------------------------
diff --git a/deployment/pcf/packages/usergrid_app/spec b/deployment/pcf/packages/usergrid_app/spec
new file mode 100644
index 0000000..176821a
--- /dev/null
+++ b/deployment/pcf/packages/usergrid_app/spec
@@ -0,0 +1,27 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+---
+name: usergrid_app
+
+dependencies: []
+
+files:
+- templates/all_open.json
+- usergrid_app/manifest.yml
+- usergrid_app/ROOT.war
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/run.sh
----------------------------------------------------------------------
diff --git a/deployment/pcf/run.sh b/deployment/pcf/run.sh
new file mode 100755
index 0000000..a4eb7c1
--- /dev/null
+++ b/deployment/pcf/run.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+export RELEASE_VERSION=2.1.0
+export TILE_METADATA_VERSION=1.6
+
+./createRelease.sh
+./createTile.sh
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/src/common/utils.sh
----------------------------------------------------------------------
diff --git a/deployment/pcf/src/common/utils.sh b/deployment/pcf/src/common/utils.sh
new file mode 100644
index 0000000..6325e7b
--- /dev/null
+++ b/deployment/pcf/src/common/utils.sh
@@ -0,0 +1,107 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+mkdir -p /var/vcap/sys/log
+
+exec > >(tee -a >(logger -p user.info -t vcap.$(basename $0).stdout) | awk -W interactive '{lineWithDate="echo [`date +\"%Y-%m-%d %H:%M:%S%z\"`] \"" $0 "\""; system(lineWithDate) }' >>/var/vcap/sys/log/$(basename $0).log)
+exec 2> >(tee -a >(logger -p user.error -t vcap.$(basename $0).stderr) | awk -W interactive '{lineWithDate="echo [`date +\"%Y-%m-%d %H:%M:%S%z\"`] \"" $0 "\""; system(lineWithDate) }' >>/var/vcap/sys/log/$(basename $0).err.log)
+
+pid_guard() {
+ echo "------------ STARTING `basename $0` at `date` --------------" | tee /dev/stderr
+ pidfile=$1
+ name=$2
+
+ if [ -f "$pidfile" ]; then
+ pid=$(head -1 "$pidfile")
+
+ if [ -n "$pid" ] && [ -e /proc/$pid ]; then
+ echo "$name is already running, please stop it first"
+ exit 1
+ fi
+
+ echo "Removing stale pidfile..."
+ rm $pidfile
+ fi
+}
+
+wait_pidfile() {
+ pidfile=$1
+ try_kill=$2
+ timeout=${3:-0}
+ force=${4:-0}
+ countdown=$(( $timeout * 10 ))
+
+ if [ -f "$pidfile" ]; then
+ pid=$(head -1 "$pidfile")
+
+ if [ -z "$pid" ]; then
+ echo "Unable to get pid from $pidfile"
+ exit 1
+ fi
+
+ if [ -e /proc/$pid ]; then
+ if [ "$try_kill" = "1" ]; then
+ echo "Killing $pidfile: $pid "
+ kill $pid
+ fi
+ while [ -e /proc/$pid ]; do
+ sleep 0.1
+ [ "$countdown" != '0' -a $(( $countdown % 10 )) = '0' ] && echo -n .
+ if [ $timeout -gt 0 ]; then
+ if [ $countdown -eq 0 ]; then
+ if [ "$force" = "1" ]; then
+ echo -ne "\nKill timed out, using kill -9 on $pid... "
+ kill -9 $pid
+ sleep 0.5
+ fi
+ break
+ else
+ countdown=$(( $countdown - 1 ))
+ fi
+ fi
+ done
+ if [ -e /proc/$pid ]; then
+ echo "Timed Out"
+ else
+ echo "Stopped"
+ fi
+ else
+ echo "Process $pid is not running"
+ fi
+
+ rm -f $pidfile
+ else
+ echo "Pidfile $pidfile doesn't exist"
+ fi
+}
+
+kill_and_wait() {
+ pidfile=$1
+ # Monit default timeout for start/stop is 30s
+ # Append 'with timeout {n} seconds' to monit start/stop program configs
+ timeout=${2:-25}
+ force=${3:-1}
+
+ wait_pidfile $pidfile 1 $timeout $force
+}
+
+running_in_container() {
+ grep -q '/instance' /proc/self/cgroup
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/src/templates/all_open.json
----------------------------------------------------------------------
diff --git a/deployment/pcf/src/templates/all_open.json b/deployment/pcf/src/templates/all_open.json
new file mode 100644
index 0000000..ef60dec
--- /dev/null
+++ b/deployment/pcf/src/templates/all_open.json
@@ -0,0 +1,6 @@
+[
+ {
+ "destination": "0.0.0.0-255.255.255.255",
+ "protocol": "all"
+ }
+]
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/src/usergrid_app/manifest.yml
----------------------------------------------------------------------
diff --git a/deployment/pcf/src/usergrid_app/manifest.yml b/deployment/pcf/src/usergrid_app/manifest.yml
new file mode 100644
index 0000000..0fe9295
--- /dev/null
+++ b/deployment/pcf/src/usergrid_app/manifest.yml
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+---
+path: ROOT.war
+timeout: 180
+memory: 1024M
[17/38] usergrid git commit: Fixes for linked collections
Posted by sn...@apache.org.
Fixes for linked collections
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/7f49c806
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/7f49c806
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/7f49c806
Branch: refs/heads/usergrid-1268-akka-211
Commit: 7f49c8068ab68ab440d3c2e430cb69f68befc53e
Parents: 9efa3b4
Author: Mike Dunker <md...@apigee.com>
Authored: Wed Jun 22 13:41:12 2016 -0700
Committer: Mike Dunker <md...@apigee.com>
Committed: Wed Jun 22 13:41:12 2016 -0700
----------------------------------------------------------------------
.../corepersistence/CpRelationManager.java | 32 +++++---
.../usergrid/rest/management/AdminUsersIT.java | 80 ++++++++++++++++++++
.../cassandra/ManagementServiceImpl.java | 33 +++++---
.../services/devices/DevicesService.java | 2 +
4 files changed, 126 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7f49c806/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
index 4082b45..39b3161 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
@@ -501,9 +501,9 @@ public class CpRelationManager implements RelationManager {
@Override
public void removeFromCollection( String collectionName, EntityRef itemRef ) throws Exception {
- // special handling for roles collection of the application
if ( headEntity.getUuid().equals( applicationId ) ) {
if ( collectionName.equals( COLLECTION_ROLES ) ) {
+ // special handling for roles collection of the application
Entity itemEntity = em.get( itemRef );
if ( itemEntity != null ) {
RoleRef roleRef = SimpleRoleRef.forRoleEntity( itemEntity );
@@ -511,12 +511,12 @@ public class CpRelationManager implements RelationManager {
return;
}
}
+ // handles normal app collection deletes
em.delete( itemRef );
return;
}
- // load the entity to be removed to the collection
-
+ // headEntity is not an application (used for management entities and entity collections like user devices)
if ( logger.isDebugEnabled() ) {
logger.debug( "Loading entity to remove from collection {}:{} from app {}\n",
@@ -531,12 +531,26 @@ public class CpRelationManager implements RelationManager {
GraphManager gm = managerCache.getGraphManager( applicationScope );
+ List<Edge> removedEdges = new ArrayList<>();
//run our delete
gm.loadEdgeVersions(
CpNamingUtils.createEdgeFromCollectionName( cpHeadEntity.getId(), collectionName, memberEntity.getId() ) )
- .flatMap(edge -> gm.markEdge(edge)).flatMap(edge -> gm.deleteEdge(edge)).toBlocking()
+ .flatMap(edge -> gm.markEdge(edge)).flatMap(edge -> gm.deleteEdge(edge))
+ .doOnNext(edge -> removedEdges.add(edge)).toBlocking()
.lastOrDefault(null);
+ CollectionInfo collection = getDefaultSchema().getCollection( headEntity.getType(), collectionName );
+ if (collection != null && collection.getLinkedCollection() != null) {
+ // delete reverse edges
+ final String pluralType = InflectionUtils.pluralize( cpHeadEntity.getId().getType() );
+ gm.loadEdgeVersions(
+ CpNamingUtils.createEdgeFromCollectionName( memberEntity.getId(), pluralType, cpHeadEntity.getId() ) )
+ .flatMap(reverseEdge -> gm.markEdge(reverseEdge))
+ .flatMap(reverseEdge -> gm.deleteEdge(reverseEdge))
+ .doOnNext(reverseEdge -> removedEdges.add(reverseEdge))
+ .toBlocking().lastOrDefault(null);
+ }
+
/**
* Remove from the index
@@ -544,12 +558,10 @@ public class CpRelationManager implements RelationManager {
*/
- //TODO: this should not happen here, needs to go to SQS
- //indexProducer.put(batch).subscribe();
- if ( !skipIndexingForType( memberEntity.getId().getType() ) ) {
-
- indexService.queueEntityDelete(applicationScope, memberEntity.getId());
- }
+ // item not deindexed, only edges
+ removedEdges.forEach(edge -> {
+ indexService.queueDeleteEdge(applicationScope, edge);
+ });
// special handling for roles collection of a group
if ( headEntity.getType().equals( Group.ENTITY_TYPE ) ) {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7f49c806/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
index 07132cb..3adc719 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
@@ -435,6 +435,7 @@ public class AdminUsersIT extends AbstractRestIT {
//Add a property to management user
Entity userProperty = new Entity( ).chainPut( "company","usergrid" );
management().users().user( newOrg.getUsername() ).put( userProperty );
+ fail("Should not have been allowed");
} catch( NotAuthorizedException e ){
@@ -445,6 +446,85 @@ public class AdminUsersIT extends AbstractRestIT {
}
+ @Test
+ public void testAdminRemovalFromOrg() throws Exception {
+ Organization newOrg = createOrgPayload( "testAdminRemovalFromOrg", null );
+ Organization orgReturned = clientSetup.getRestClient().management().orgs().post(newOrg);
+ User owner = orgReturned.getOwner();
+ assertNotNull(owner);
+ String orgName = orgReturned.getName();
+ Token ownerToken = management.token().get(owner.getUsername(), orgName);
+
+ // add a new admin user to the org
+ Entity adminUserPayload = new Entity();
+ String newAdminUserName = "newAdminUser"+UUIDUtils.newTimeUUID();
+ adminUserPayload.put( "username", newAdminUserName );
+ adminUserPayload.put( "name", newAdminUserName );
+ adminUserPayload.put( "email", newAdminUserName+"@usergrid.com" );
+ adminUserPayload.put( "password", newAdminUserName );
+
+ management.token().setToken(ownerToken);
+ management.orgs().org(orgName).users().post(User.class, adminUserPayload);
+
+ // get token of the new admin user
+ Token adminToken = management.token().get(newAdminUserName, newAdminUserName);
+ assertNotNull(adminToken);
+
+ // get org info
+ try {
+ management.token().setToken(adminToken);
+ management.orgs().org(orgName).get();
+ }
+ catch (Exception e) {
+ // should have been allowed
+ fail("Should have worked: " + e.getMessage());
+ }
+
+ // remove access
+ try {
+ management.token().setToken(ownerToken);
+ management.orgs().org(orgName).users().user(newAdminUserName).delete();
+ }
+ catch (Exception e) {
+ // should have been allowed
+ fail("Should have worked: " + e.getMessage());
+ }
+
+ // get org info (should be unsuccessful)
+ try {
+ management.token().setToken(adminToken);
+ management.orgs().org(orgName).get();
+ fail("Should not have allowed org access");
+ }
+ catch (NotAuthorizedException nae) {
+ // this is the right return
+
+ }
+ catch (Exception e) {
+ fail("Should have been unauthorized: " + e.getMessage());
+ }
+
+ // restore access
+ try {
+ management.token().setToken(ownerToken);
+ management.orgs().org(orgName).users().user(newAdminUserName).put(new Entity());
+ }
+ catch (Exception e) {
+ // should have been allowed
+ fail("Should have worked: " + e.getMessage());
+ }
+
+ // get org info
+ try {
+ management.token().setToken(adminToken);
+ management.orgs().org(orgName).get();
+ }
+ catch (Exception e) {
+ // should have been allowed
+ fail("Should have worked: " + e.getMessage());
+ }
+
+ }
/**
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7f49c806/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
index 73a56c8..b56f211 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
@@ -1580,7 +1580,8 @@ public class ManagementServiceImpl implements ManagementService {
BiMap<UUID, String> organizations = HashBiMap.create();
EntityManager em = emf.getEntityManager( smf.getManagementAppId() );
- Results results = em.getCollection( new SimpleEntityRef( User.ENTITY_TYPE, userId ),
+ EntityRef userRef = new SimpleEntityRef(User.ENTITY_TYPE, userId);
+ Results results = em.getCollection( userRef,
Schema.COLLECTION_GROUPS, null, 1000, Level.ALL_PROPERTIES, false );
do {
@@ -1592,10 +1593,17 @@ public class ManagementServiceImpl implements ManagementService {
path = path.toLowerCase();
}
- try {
- organizations.put( entity.getUuid(), path );
- } catch (IllegalArgumentException e) {
- logger.warn("Error adding {}:{} to BiMap: {}", entity.getUuid(), path, e.getMessage() );
+ // check that user is in users collection for org
+ EntityRef groupRef = new SimpleEntityRef(Group.ENTITY_TYPE, entity.getUuid());
+ if (em.isCollectionMember(groupRef, Schema.COLLECTION_USERS, userRef)) {
+ try {
+ organizations.put(entity.getUuid(), path);
+ } catch (IllegalArgumentException e) {
+ logger.warn("Error adding {}:{} to BiMap: {}", entity.getUuid(), path, e.getMessage());
+ }
+ } else {
+ // org doesn't know about user, so read repair
+ em.removeFromCollection(userRef, Schema.COLLECTION_GROUPS, groupRef);
}
}
@@ -1698,16 +1706,18 @@ public class ManagementServiceImpl implements ManagementService {
EntityManager em = emf.getEntityManager( smf.getManagementAppId() );
+ EntityRef orgRef = new SimpleEntityRef( Group.ENTITY_TYPE, organization.getUuid() );
+ EntityRef userRef = new SimpleEntityRef( User.ENTITY_TYPE, user.getUuid() );
+
- if(em.getCollection(organization.getUuid() ,"users",Query.fromQL( "select * where uuid ="+user.getUuid() ),Level.IDS ).size() >0){
+ if(em.isCollectionMember(orgRef, Schema.COLLECTION_USERS, userRef)) {
if(logger.isDebugEnabled()) {
logger.debug( "addAdminUserToOrganization - Found value: {} already in collection", user.getName() );
}
return;
}
- em.addToCollection(new SimpleEntityRef(Group.ENTITY_TYPE, organization.getUuid()), "users",
- new SimpleEntityRef(User.ENTITY_TYPE, user.getUuid()));
+ em.addToCollection(orgRef, Schema.COLLECTION_USERS, userRef);
invalidateManagementAppAuthCache();
@@ -1733,10 +1743,11 @@ public class ManagementServiceImpl implements ManagementService {
EntityManager em = emf.getEntityManager( smf.getManagementAppId() );
try {
- int size = em.getCollection( new SimpleEntityRef( Group.ENTITY_TYPE, organizationId ),
- "users", null, 2, Level.IDS, false ).size();
+ Results collection = em.getCollection( new SimpleEntityRef( Group.ENTITY_TYPE, organizationId ),
+ "users", null, 2, Level.IDS, false );
+ int size = collection.size();
- if ( !force && size <= 1 ) {
+ if ( !force && (size == 0 || (size == 1 && collection.getId() == userId))) {
throw new Exception();
}
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7f49c806/stack/services/src/main/java/org/apache/usergrid/services/devices/DevicesService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/devices/DevicesService.java b/stack/services/src/main/java/org/apache/usergrid/services/devices/DevicesService.java
index f57a03a..111c96a 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/devices/DevicesService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/devices/DevicesService.java
@@ -85,6 +85,8 @@ public class DevicesService extends AbstractCollectionService {
for (EntityRef userDevice : userDevices) {
if(userDevice.getUuid().equals(deviceRef.getUuid())) { //only remove the current device from user
em.removeFromCollection(user, "devices", userDevice);
+ // TODO: may want to actually remove the device
+ // em.delete(userDevice);
}
}
em.removeFromCollection(deviceRef, "users", user);
[20/38] usergrid git commit: Better handle different combinations of
possible duplicate entities and their respective versions.
Posted by sn...@apache.org.
Better handle different combinations of possible duplicate entities and their respective versions.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/70f50c22
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/70f50c22
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/70f50c22
Branch: refs/heads/usergrid-1268-akka-211
Commit: 70f50c22dfae76471713a6a01eae772b1b7bd9b6
Parents: 5c81a02
Author: Michael Russo <mr...@apigee.com>
Authored: Wed Jun 22 22:35:59 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Wed Jun 22 22:35:59 2016 -0700
----------------------------------------------------------------------
.../UniqueValueSerializationStrategyImpl.java | 116 +++++++++++++------
...niqueValueSerializationStrategyImplTest.java | 115 ++++++++++++++++++
2 files changed, 197 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/70f50c22/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
index a323746..2a53194 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
@@ -71,6 +71,8 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
public static final int COL_VALUE = 0x0;
+ private final Comparator<UniqueValue> uniqueValueComparator = new UniqueValueComparator();
+
private final SerializationFig serializationFig;
protected final Keyspace keyspace;
@@ -266,7 +268,7 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
Iterator<Row<ScopedRowKey<FieldKey>, EntityVersion>> results =
keyspace.prepareQuery( CF_UNIQUE_VALUES ).setConsistencyLevel( consistencyLevel ).getKeySlice( keys )
- .withColumnRange(new RangeBuilder().setLimit(serializationFig.getBufferSize()).build())
+ .withColumnRange(new RangeBuilder().setLimit(serializationFig.getMaxLoadSize()).build())
.execute().getResult().iterator();
@@ -285,10 +287,8 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
continue;
}
- // these used duplicate tracking and cleanup
- UUID oldestEntityUUID = null;
- UniqueValueImpl firstUniqueValue = null;
+ List<UniqueValue> candidates = new ArrayList<>();
/**
* While iterating the columns, a rule is being enforced to only EVER return the oldest UUID. This means
@@ -304,55 +304,77 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
final EntityVersion entityVersion = columnList.next().getName();
- final UUID currentEntityUUID = entityVersion.getEntityId().getUuid();
- final UniqueValueImpl uniqueValue =
+ final UniqueValue uniqueValue =
new UniqueValueImpl(field, entityVersion.getEntityId(), entityVersion.getEntityVersion());
- // keep track of the first and oldest entity (not version),
- // knowing the the first one may not be the 'oldest'
- if(oldestEntityUUID == null){
+ // set the initial candidate and move on
+ if(candidates.size() == 0){
+ candidates.add(uniqueValue);
+ continue;
+ }
- oldestEntityUUID = currentEntityUUID;
- firstUniqueValue = uniqueValue;
+ final int result = uniqueValueComparator.compare(uniqueValue, candidates.get(candidates.size() -1));
- }else if(currentEntityUUID.timestamp() < oldestEntityUUID.timestamp()){
+ if(result == 0){
- oldestEntityUUID = currentEntityUUID;
- }
+ // do nothing, only versions can be newer and we're not worried about newer versions of same entity
+ if(logger.isTraceEnabled()){
+ logger.trace("Candidate unique value is equal to the current unique value");
+ }
+ // update candidate w/ latest version
+ candidates.add(uniqueValue);
- // only return the oldest (original) unique value entries
- if(currentEntityUUID.timestamp() <= oldestEntityUUID.timestamp() ){
+ }else if(result < 0){
- if (logger.isTraceEnabled()) {
- logger.trace("Putting unique value [{}={}] into result set with entity id [{}] and entity version [{}]",
- field.getName(), field.getValue().toString(),
- entityVersion.getEntityId(),
- entityVersion.getEntityVersion());
- }
+ // delete the duplicate from the unique value index
+ candidates.forEach(candidate -> {
- uniqueValueSet.addValue(uniqueValue);
+ try {
- }
- // remove the newer duplicated unique value entries
- else{
+ logger.warn("Duplicate unique value [{}={}] found, removing older entry " +
+ "with entity id [{}] and entity version [{}]", field.getName(), field.getValue().toString(),
+ candidate.getEntityId().getUuid(), candidate.getEntityVersion() );
- delete(appScope, uniqueValue ).execute();
+ delete(appScope, candidate ).execute();
+ } catch (ConnectionException e) {
+ // do nothing for now
+ }
- }
+ });
- }
+ candidates.clear();
+
+ if(logger.isTraceEnabled()) {
+ logger.info("Updating candidate to entity id [{}] and entity version [{}]",
+ uniqueValue.getEntityId().getUuid(), uniqueValue.getEntityVersion());
+
+ }
- // check to see if the very first unique value entry was overwritten because it was not the oldest
- // if so, clean up its unique index
- if( !uniqueValueSet.getValue( firstUniqueValue.getField().getName() )
- .getEntityId().getUuid().equals(firstUniqueValue.getEntityId().getUuid()) ){
+ // add our new candidate to the list
+ candidates.add(uniqueValue);
+
+ // add our new candidate to the result set
+ //uniqueValueSet.addValue(candidate);
+
+ }else{
+
+ logger.warn("Duplicate unique value [{}={}] found, removing newer entry " +
+ "with entity id [{}] and entity version [{}]", field.getName(), field.getValue().toString(),
+ uniqueValue.getEntityId().getUuid(), uniqueValue.getEntityVersion() );
+
+ // delete the duplicate from the unique value index
+ delete(appScope, uniqueValue ).execute();
+
+
+ }
- delete(appScope, firstUniqueValue).execute();
}
+ // take the last candidate ( should be the latest version) and add to the result set
+ uniqueValueSet.addValue(candidates.get(candidates.size() -1));
}
@@ -472,4 +494,30 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
* @param uniqueValueId The uniqueValue
*/
protected abstract EntityKey createEntityUniqueLogKey(final Id applicationId, final Id uniqueValueId );
+
+
+
+ private class UniqueValueComparator implements Comparator<UniqueValue> {
+
+ @Override
+ public int compare(UniqueValue o1, UniqueValue o2) {
+
+ if( o1.getEntityId().getUuid().equals(o2.getEntityId().getUuid())){
+
+ return 0;
+
+ }else if( o1.getEntityId().getUuid().timestamp() < o2.getEntityId().getUuid().timestamp()){
+
+ return -1;
+
+ }
+
+ // if the UUIDs are not equal and o1's timestamp is not less than o2's timestamp,
+ // then o1 must be greater than o2
+ return 1;
+
+
+ }
+ }
+
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/70f50c22/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java
index 6c4e72b..ed3e42b 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java
@@ -442,4 +442,119 @@ public abstract class UniqueValueSerializationStrategyImplTest {
}
+ @Test
+ public void testDuplicateEntitiesDescending() throws ConnectionException, InterruptedException {
+
+ ApplicationScope scope =
+ new ApplicationScopeImpl( new SimpleId( "organization" ) );
+
+ IntegerField field = new IntegerField( "count", 5 );
+ Id entityId1 = new SimpleId( UUIDGenerator.newTimeUUID(), "entity" );
+ Id entityId2 = new SimpleId( UUIDGenerator.newTimeUUID(), "entity" );
+ Id entityId3 = new SimpleId( UUIDGenerator.newTimeUUID(), "entity" );
+
+
+
+ UUID version1 = UUIDGenerator.newTimeUUID();
+ UUID version2 = UUIDGenerator.newTimeUUID();
+ UUID version3 = UUIDGenerator.newTimeUUID();
+
+ UniqueValue stored1 = new UniqueValueImpl( field, entityId3, version1 );
+ UniqueValue stored2 = new UniqueValueImpl( field, entityId2, version2 );
+ UniqueValue stored3 = new UniqueValueImpl( field, entityId1, version3 );
+
+
+ strategy.write( scope, stored1 ).execute();
+ strategy.write( scope, stored2 ).execute();
+ strategy.write( scope, stored3 ).execute();
+
+
+ // load descending to get the older version of entity for this unique value
+ UniqueValueSet fields = strategy.load( scope, entityId1.getType(), Collections.<Field>singleton( field ));
+
+ UniqueValue retrieved = fields.getValue( field.getName() );
+ assertEquals( stored3, retrieved );
+
+
+ }
+
+ @Test
+ public void testDuplicateEntitiesAscending() throws ConnectionException, InterruptedException {
+
+ ApplicationScope scope =
+ new ApplicationScopeImpl( new SimpleId( "organization" ) );
+
+ IntegerField field = new IntegerField( "count", 5 );
+ Id entityId1 = new SimpleId( UUIDGenerator.newTimeUUID(), "entity" );
+ Id entityId2 = new SimpleId( UUIDGenerator.newTimeUUID(), "entity" );
+ Id entityId3 = new SimpleId( UUIDGenerator.newTimeUUID(), "entity" );
+
+
+
+ UUID version1 = UUIDGenerator.newTimeUUID();
+ UUID version2 = UUIDGenerator.newTimeUUID();
+ UUID version3 = UUIDGenerator.newTimeUUID();
+
+ UniqueValue stored1 = new UniqueValueImpl( field, entityId1, version1 );
+ UniqueValue stored2 = new UniqueValueImpl( field, entityId2, version2 );
+ UniqueValue stored3 = new UniqueValueImpl( field, entityId3, version3 );
+
+
+ strategy.write( scope, stored1 ).execute();
+ strategy.write( scope, stored2 ).execute();
+ strategy.write( scope, stored3 ).execute();
+
+
+ // load descending to get the older version of entity for this unique value
+ UniqueValueSet fields = strategy.load( scope, entityId1.getType(), Collections.<Field>singleton( field ));
+
+ UniqueValue retrieved = fields.getValue( field.getName() );
+ assertEquals( stored1, retrieved );
+
+
+ }
+
+ @Test
+ public void testMixedDuplicates() throws ConnectionException, InterruptedException {
+
+ ApplicationScope scope =
+ new ApplicationScopeImpl( new SimpleId( "organization" ) );
+
+ IntegerField field = new IntegerField( "count", 5 );
+ Id entityId1 = new SimpleId( UUIDGenerator.newTimeUUID(), "entity" );
+ Id entityId2 = new SimpleId( UUIDGenerator.newTimeUUID(), "entity" );
+ Id entityId3 = new SimpleId( UUIDGenerator.newTimeUUID(), "entity" );
+
+
+
+ UUID version1 = UUIDGenerator.newTimeUUID();
+ UUID version2 = UUIDGenerator.newTimeUUID();
+ UUID version3 = UUIDGenerator.newTimeUUID();
+ UUID version4 = UUIDGenerator.newTimeUUID();
+ UUID version5 = UUIDGenerator.newTimeUUID();
+
+ UniqueValue stored1 = new UniqueValueImpl( field, entityId1, version5 );
+ UniqueValue stored2 = new UniqueValueImpl( field, entityId2, version4 );
+ UniqueValue stored3 = new UniqueValueImpl( field, entityId1, version3 );
+ UniqueValue stored4 = new UniqueValueImpl( field, entityId3, version2 );
+ UniqueValue stored5 = new UniqueValueImpl( field, entityId3, version1 );
+
+
+
+ strategy.write( scope, stored1 ).execute();
+ strategy.write( scope, stored2 ).execute();
+ strategy.write( scope, stored3 ).execute();
+ strategy.write( scope, stored4 ).execute();
+ strategy.write( scope, stored5 ).execute();
+
+
+ // load descending to get the older version of entity for this unique value
+ UniqueValueSet fields = strategy.load( scope, entityId1.getType(), Collections.<Field>singleton( field ));
+
+ UniqueValue retrieved = fields.getValue( field.getName() );
+ assertEquals( stored1, retrieved );
+
+
+ }
+
}
[06/38] usergrid git commit: Fix logging statement.
Posted by sn...@apache.org.
Fix logging statement.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/8814a144
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/8814a144
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/8814a144
Branch: refs/heads/usergrid-1268-akka-211
Commit: 8814a144b66054048be96a1c892fd750ee327327
Parents: 4bf7761
Author: Michael Russo <mr...@apigee.com>
Authored: Tue Jun 14 21:59:24 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Tue Jun 14 21:59:24 2016 -0700
----------------------------------------------------------------------
.../corepersistence/asyncevents/AsyncEventServiceImpl.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/8814a144/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java
index 8d050fe..0bff887 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java
@@ -355,9 +355,12 @@ public class AsyncEventServiceImpl implements AsyncEventService {
throw new Exception("Unknown EventType for message: "+ message.getStringBody().trim());
}
- if( single.isEmpty() ){
- logger.warn("No index operation messages came back from event processing for msg {} ",
- message.getStringBody().trim());
+
+ if( !(event instanceof ElasticsearchIndexEvent)
+ && !(event instanceof InitializeApplicationIndexEvent)
+ && single.isEmpty() ){
+ logger.warn("No index operation messages came back from event processing for msg: {} ",
+ message.getStringBody().trim());
}
[36/38] usergrid git commit: Merge branch 'release-2.1.1' of
https://git-wip-us.apache.org/repos/asf/usergrid into release-2.1.1
Posted by sn...@apache.org.
Merge branch 'release-2.1.1' of https://git-wip-us.apache.org/repos/asf/usergrid into release-2.1.1
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/37c482c5
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/37c482c5
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/37c482c5
Branch: refs/heads/usergrid-1268-akka-211
Commit: 37c482c5ee4175706a05034e8e3252d03f0b24f7
Parents: c4f72ef 9c4b524
Author: Dave Johnson <sn...@apache.org>
Authored: Wed Jun 29 08:45:25 2016 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Wed Jun 29 08:45:25 2016 -0400
----------------------------------------------------------------------
.../corepersistence/CpRelationManager.java | 40 ++++++++---------
.../asyncevents/EventBuilderImpl.java | 7 ++-
.../UniqueValueSerializationStrategyImpl.java | 11 ++---
.../index/impl/EsEntityIndexImpl.java | 47 +++++++-------------
4 files changed, 43 insertions(+), 62 deletions(-)
----------------------------------------------------------------------
[05/38] usergrid git commit: Merge commit 'refs/pull/537/head' of
github.com:apache/usergrid into release-2.1.1
Posted by sn...@apache.org.
Merge commit 'refs/pull/537/head' of github.com:apache/usergrid into release-2.1.1
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/4bf7761b
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/4bf7761b
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/4bf7761b
Branch: refs/heads/usergrid-1268-akka-211
Commit: 4bf7761bec6076a5d1acb0bce71ad0ffcf016dae
Parents: 7af4f84 7ea48c2
Author: Michael Russo <mr...@apigee.com>
Authored: Tue Jun 14 18:32:25 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Tue Jun 14 18:32:25 2016 -0700
----------------------------------------------------------------------
.../main/resources/usergrid-default.properties | 4 +++
.../rest/management/ManagementResource.java | 4 +--
.../shiro/filters/BasicAuthSecurityFilter.java | 19 ++++++++++--
.../management/AccountCreationProps.java | 3 +-
.../usergrid/management/ManagementService.java | 6 +++-
.../cassandra/AccountCreationPropsImpl.java | 17 +++++++++--
.../cassandra/ManagementServiceImpl.java | 32 ++++++++++++++++----
.../apache/usergrid/security/shiro/Realm.java | 6 ----
.../shiro/principals/AdminUserPrincipal.java | 4 +--
.../usergrid/management/OrganizationIT.java | 2 +-
.../cassandra/ManagementServiceIT.java | 6 ++--
11 files changed, 77 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
[21/38] usergrid git commit: Fix some comments.
Posted by sn...@apache.org.
Fix some comments.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/e24ea20d
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/e24ea20d
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/e24ea20d
Branch: refs/heads/usergrid-1268-akka-211
Commit: e24ea20d7bd0a83b34577470e28327dccd174f66
Parents: 70f50c2
Author: Michael Russo <mr...@apigee.com>
Authored: Wed Jun 22 22:42:43 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Wed Jun 22 22:42:43 2016 -0700
----------------------------------------------------------------------
.../serialization/impl/UniqueValueSerializationStrategyImpl.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/e24ea20d/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
index 2a53194..8a41bff 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
@@ -338,12 +338,14 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
candidate.getEntityId().getUuid(), candidate.getEntityVersion() );
delete(appScope, candidate ).execute();
+
} catch (ConnectionException e) {
// do nothing for now
}
});
+ // clear the transient candidates list
candidates.clear();
if(logger.isTraceEnabled()) {
@@ -355,8 +357,6 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
// add our new candidate to the list
candidates.add(uniqueValue);
- // add our new candidate to the result set
- //uniqueValueSet.addValue(candidate);
}else{
[15/38] usergrid git commit: Add new tool for scanning unique values.
Include option to skip read repair in the methods that load entities from the
unique index.
Posted by sn...@apache.org.
Add new tool for scanning unique values. Include option to skip read repair in the methods that load entities from the unique index.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/06f77d7b
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/06f77d7b
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/06f77d7b
Branch: refs/heads/usergrid-1268-akka-211
Commit: 06f77d7b385efdcb3655035e895d89f99710a70a
Parents: 9efa3b4
Author: Michael Russo <mr...@apigee.com>
Authored: Tue Jun 21 14:29:50 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Tue Jun 21 14:29:50 2016 -0700
----------------------------------------------------------------------
.../corepersistence/CpEntityManager.java | 9 +-
.../usergrid/persistence/EntityManager.java | 2 +-
.../collection/EntityCollectionManager.java | 3 +-
.../impl/EntityCollectionManagerImpl.java | 7 +-
.../UniqueValueSerializationStrategyImpl.java | 15 +-
.../collection/EntityCollectionManagerIT.java | 63 +++--
.../services/AbstractCollectionService.java | 8 +-
.../services/AbstractConnectionsService.java | 6 +-
.../usergrid/tools/UniqueValueScanner.java | 245 +++++++++++++++++++
9 files changed, 314 insertions(+), 44 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/06f77d7b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
index 82c4c87..ab62b36 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
@@ -853,10 +853,9 @@ public class CpEntityManager implements EntityManager {
}
@Override
- public Entity getUniqueEntityFromAlias( String collectionType, String aliasType ){
- String collName = Schema.defaultCollectionName( collectionType );
-
+ public Entity getUniqueEntityFromAlias(String collectionType, String aliasType, boolean useReadRepair){
+ String collName = Schema.defaultCollectionName( collectionType );
String propertyName = Schema.getDefaultSchema().aliasProperty( collName );
Timer.Context repairedEntityGet = entGetRepairedEntityTimer.time();
@@ -867,7 +866,7 @@ public class CpEntityManager implements EntityManager {
StringField uniqueLookupRepairField = new StringField( propertyName, aliasType.toString());
Observable<FieldSet> fieldSetObservable = ecm.getEntitiesFromFields(
- Inflector.getInstance().singularize( collectionType ), Arrays.<Field>asList( uniqueLookupRepairField ) );
+ Inflector.getInstance().singularize( collectionType ), Arrays.<Field>asList( uniqueLookupRepairField ), useReadRepair);
if(fieldSetObservable == null){
@@ -901,7 +900,7 @@ public class CpEntityManager implements EntityManager {
StringField uniqueLookupRepairField = new StringField( propertyName, aliasType);
Observable<FieldSet> fieldSetObservable = ecm.getEntitiesFromFields(
- Inflector.getInstance().singularize( collectionType ), Collections.singletonList(uniqueLookupRepairField));
+ Inflector.getInstance().singularize( collectionType ), Collections.singletonList(uniqueLookupRepairField), true);
if(fieldSetObservable == null){
http://git-wip-us.apache.org/repos/asf/usergrid/blob/06f77d7b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManager.java b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManager.java
index ef96f10..53a7a89 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManager.java
@@ -709,7 +709,7 @@ public interface EntityManager {
public void flushManagerCaches();
- public Entity getUniqueEntityFromAlias( String aliasType, String aliasValue );
+ public Entity getUniqueEntityFromAlias(String aliasType, String aliasValue, boolean useReadRepair);
public UUID getUniqueIdFromAlias( String aliasType, String aliasValue );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/06f77d7b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java
index 22fbb5f..ed43775 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java
@@ -76,9 +76,10 @@ public interface EntityCollectionManager {
* Get a fieldset of all fields from the entities
* @param entityType The type of entity. From the "type" field in the id.
* @param fields The collection of fields to search
+ * @param useReadRepair
* @return
*/
- Observable<FieldSet> getEntitiesFromFields( String entityType, Collection<Field> fields );
+ Observable<FieldSet> getEntitiesFromFields(String entityType, Collection<Field> fields, boolean useReadRepair);
/**
* Gets the Id for a field
http://git-wip-us.apache.org/repos/asf/usergrid/blob/06f77d7b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
index 77e452f..1ccc18f 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
@@ -65,7 +65,6 @@ import org.apache.usergrid.persistence.core.util.ValidationUtils;
import org.apache.usergrid.persistence.model.entity.Entity;
import org.apache.usergrid.persistence.model.entity.Id;
import org.apache.usergrid.persistence.model.field.Field;
-import org.apache.usergrid.persistence.model.util.EntityUtils;
import org.apache.usergrid.persistence.model.util.UUIDGenerator;
import com.codahale.metrics.Timer;
@@ -82,7 +81,6 @@ import com.netflix.astyanax.serializers.StringSerializer;
import rx.Observable;
import rx.Subscriber;
-import rx.functions.Action0;
/**
@@ -327,7 +325,7 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
* Retrieves all entities that correspond to each field given in the Collection.
*/
@Override
- public Observable<FieldSet> getEntitiesFromFields( final String type, final Collection<Field> fields ) {
+ public Observable<FieldSet> getEntitiesFromFields(final String type, final Collection<Field> fields, boolean useReadRepair) {
final Observable<FieldSet> fieldSetObservable = Observable.just( fields ).map( fields1 -> {
try {
@@ -408,7 +406,7 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
response.addEntity( expectedUnique.getField(), entity );
}
- if ( deleteBatch.getRowCount() > 0 ) {
+ if ( useReadRepair && deleteBatch.getRowCount() > 0 ) {
deleteBatch.execute();
@@ -436,7 +434,6 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
}
-
return response;
}
catch ( ConnectionException e ) {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/06f77d7b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
index 622ebef..f7d5199 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
@@ -64,7 +64,7 @@ import com.netflix.astyanax.util.RangeBuilder;
public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
implements UniqueValueSerializationStrategy {
- private static final Logger log = LoggerFactory.getLogger( UniqueValueSerializationStrategyImpl.class );
+ private static final Logger logger = LoggerFactory.getLogger( UniqueValueSerializationStrategyImpl.class );
private final MultiTenantColumnFamily<ScopedRowKey<FieldKey>, EntityVersion>
@@ -159,7 +159,7 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
//we purposefully leave out TTL. Worst case we issue deletes against tombstoned columns
- //best case, we clean up an invalid secondary index entry when the log is used
+ //best case, we clean up an invalid secondary index entry when the logger is used
@Override
public void doLog( final ColumnListMutation<UniqueFieldEntry> colMutation ) {
colMutation.putColumn( uniqueFieldEntry, COL_VALUE );
@@ -225,8 +225,8 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
ScopedRowKey.fromKey( applicationId, entityKey ) ) );
- if ( log.isTraceEnabled() ) {
- log.trace( "Writing unique value version={} name={} value={} ",
+ if ( logger.isTraceEnabled() ) {
+ logger.trace( "Writing unique value version={} name={} value={} ",
uniqueValue.getEntityVersion(), uniqueValue.getField().getName(),
uniqueValue.getField().getValue()
);
@@ -296,6 +296,13 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
final UniqueValueImpl uniqueValue =
new UniqueValueImpl( field, entityVersion.getEntityId(), entityVersion.getEntityVersion() );
+ if(logger.isTraceEnabled()){
+ logger.trace("Putting unique value [{}={}] into result set with entity id [{}] and entity version [{}]",
+ field.getName(), field.getValue().toString(),
+ entityVersion.getEntityId(),
+ entityVersion.getEntityVersion());
+ }
+
uniqueValueSet.addValue( uniqueValue );
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/06f77d7b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
index 115be99..10c7eb7 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
@@ -20,7 +20,6 @@ package org.apache.usergrid.persistence.collection;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collections;
import java.util.List;
import java.util.UUID;
@@ -118,27 +117,49 @@ public class EntityCollectionManagerIT {
EntityCollectionManager manager = factory.createCollectionManager( context );
- {
- Entity newEntity = new Entity( new SimpleId( "test" ) );
- newEntity.setField( new IntegerField( "count", 5, true ) );
+ Entity entity = new Entity( new SimpleId( "test" ) );
+ entity.setField( new IntegerField( "count", 5, true ) );
+
+ Observable<Entity> firstWrite = manager.write( entity );
+
+ Entity newEntity = null;
+ Entity firstReturned = null;
+
+ for(int i=0; i<500; i++){
- Observable<Entity> observable = manager.write( newEntity );
- Entity returned = observable.toBlocking().lastOrDefault( null );
- }
- {
- try {
- Entity newEntity = new Entity( new SimpleId( "test" ) );
- newEntity.setField( new IntegerField( "count", 5, true ) );
-
- manager.write( newEntity ).toBlocking().last();
- fail( "Write should have thrown an exception" );
- }
- catch ( Exception ex ) {
- WriteUniqueVerifyException e = ( WriteUniqueVerifyException ) ex;
- assertEquals( 1, e.getVioliations().size() );
- }
+ firstReturned = firstWrite.toBlocking().lastOrDefault( null );
+
}
+
+// try {
+// //newEntity = new Entity( new SimpleId( "test" ) );
+// //newEntity.setField( new IntegerField( "count", 5, true ) );
+//
+// Observable<Entity> secondWrite = manager.write( entity );
+// secondReturned = secondWrite.toBlocking().lastOrDefault( null );
+//
+// //fail( "Write should have thrown an exception" );
+// }
+// catch ( Exception ex ) {
+// WriteUniqueVerifyException e = ( WriteUniqueVerifyException ) ex;
+// assertEquals( 1, e.getVioliations().size() );
+// }
+
+ // try fetching the original one again
+
+ assertEquals(entity.getId().getUuid(), firstReturned.getId().getUuid());
+ assertEquals(entity.getVersion(), firstReturned.getVersion());
+
+
+ //assertEquals(newEntity.getId().getUuid(), secondReturned.getId().getUuid());
+ //assertEquals(newEntity.getVersion(), secondReturned.getVersion());
+
+
+
+
+
+
}
@@ -737,7 +758,7 @@ public class EntityCollectionManagerIT {
assertNotNull( "Version was assigned", createReturned.getVersion() );
FieldSet fieldResults =
- manager.getEntitiesFromFields( newEntity.getId().getType(), Arrays.<Field>asList( expectedInteger ) )
+ manager.getEntitiesFromFields( newEntity.getId().getType(), Arrays.<Field>asList( expectedInteger ), false)
.toBlocking().last();
assertEquals( 1, fieldResults.size() );
@@ -754,7 +775,7 @@ public class EntityCollectionManagerIT {
//try to load via the unique field, should have triggered repair
final FieldSet results =
- manager.getEntitiesFromFields( newEntity.getId().getType(), Arrays.<Field>asList( expectedInteger ) )
+ manager.getEntitiesFromFields( newEntity.getId().getType(), Arrays.<Field>asList( expectedInteger ), false)
.toBlocking().last();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/06f77d7b/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java b/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
index c5473cf..7b9e230 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
@@ -85,7 +85,7 @@ public class AbstractCollectionService extends AbstractService {
nameProperty = "name";
}
- Entity entity = em.getUniqueEntityFromAlias( getEntityType(), name );
+ Entity entity = em.getUniqueEntityFromAlias( getEntityType(), name, true);
if ( entity != null ) {
entity = importEntity( request, entity );
}
@@ -282,7 +282,7 @@ public class AbstractCollectionService extends AbstractService {
}
// EntityRef ref = em.getAlias( getEntityType(), name );
- Entity entity = em.getUniqueEntityFromAlias( getEntityType(), name );
+ Entity entity = em.getUniqueEntityFromAlias( getEntityType(), name, true);
if ( entity == null ) {
// null entity ref means we tried to put a non-existing entity
// before we create a new entity for it, we should check for permission
@@ -477,7 +477,7 @@ public class AbstractCollectionService extends AbstractService {
return super.postItemByName( context, name );
}
- Entity entity = em.getUniqueEntityFromAlias( getEntityType(), name );
+ Entity entity = em.getUniqueEntityFromAlias( getEntityType(), name, true);
if ( entity == null ) {
throw new ServiceResourceNotFoundException( context );
}
@@ -531,7 +531,7 @@ public class AbstractCollectionService extends AbstractService {
return getItemByName( context, name );
}
- Entity entity = em.getUniqueEntityFromAlias( getEntityType(), name );
+ Entity entity = em.getUniqueEntityFromAlias( getEntityType(), name, true);
if ( entity == null ) {
throw new ServiceResourceNotFoundException( context );
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/06f77d7b/stack/services/src/main/java/org/apache/usergrid/services/AbstractConnectionsService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/AbstractConnectionsService.java b/stack/services/src/main/java/org/apache/usergrid/services/AbstractConnectionsService.java
index 395f2d4..5f7ca6b 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/AbstractConnectionsService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/AbstractConnectionsService.java
@@ -271,7 +271,7 @@ public class AbstractConnectionsService extends AbstractService {
//TODO T.N. USERGRID-1919 actually validate this is connected
- Entity entity = em.getUniqueEntityFromAlias( query.getEntityType(), name );
+ Entity entity = em.getUniqueEntityFromAlias( query.getEntityType(), name, true);
if ( entity == null ) {
return null;
}
@@ -372,7 +372,7 @@ public class AbstractConnectionsService extends AbstractService {
if ( query.containsSingleNameOrEmailIdentifier() ) {
String name = query.getSingleNameOrEmailIdentifier();
- entity = em.getUniqueEntityFromAlias( query.getEntityType(), name );
+ entity = em.getUniqueEntityFromAlias( query.getEntityType(), name, true);
if ( entity == null ) {
throw new ServiceResourceNotFoundException( context );
}
@@ -529,7 +529,7 @@ public class AbstractConnectionsService extends AbstractService {
nameProperty = "name";
}
- Entity entity = em.getUniqueEntityFromAlias( query.getEntityType(), name );
+ Entity entity = em.getUniqueEntityFromAlias( query.getEntityType(), name, true);
if ( entity == null ) {
throw new ServiceResourceNotFoundException( context );
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/06f77d7b/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueValueScanner.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueValueScanner.java b/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueValueScanner.java
new file mode 100644
index 0000000..f884a1d
--- /dev/null
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueValueScanner.java
@@ -0,0 +1,245 @@
+/*
+ * 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.usergrid.tools;
+
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.UUID;
+
+import com.google.common.base.Optional;
+import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
+import com.netflix.astyanax.model.Column;
+import com.netflix.astyanax.util.RangeBuilder;
+import org.apache.usergrid.persistence.Entity;
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.collection.MvccEntity;
+import org.apache.usergrid.persistence.collection.serialization.MvccEntitySerializationStrategy;
+import org.apache.usergrid.persistence.collection.serialization.UniqueValueSerializationStrategy;
+import org.apache.usergrid.persistence.collection.serialization.UniqueValueSet;
+import org.apache.usergrid.persistence.collection.serialization.impl.*;
+import org.apache.usergrid.persistence.core.scope.ApplicationScopeImpl;
+import org.apache.usergrid.persistence.model.entity.SimpleId;
+import org.apache.usergrid.persistence.model.field.StringField;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.Option;
+import org.apache.commons.cli.OptionBuilder;
+import org.apache.commons.cli.Options;
+
+
+import org.apache.usergrid.persistence.core.astyanax.MultiTenantColumnFamily;
+import org.apache.usergrid.persistence.core.astyanax.ScopedRowKey;
+import org.apache.usergrid.persistence.core.astyanax.ScopedRowKeySerializer;
+
+
+
+public class UniqueValueScanner extends ToolBase {
+
+ private static final Logger logger = LoggerFactory.getLogger( UniqueValueScanner.class );
+
+ private static final String APPLICATION_ARG = "app";
+
+ private static final String ENTITY_TYPE_ARG = "entityType";
+
+ private static final String ENTITY_NAME_ARG = "entityName";
+
+
+ //copied shamelessly from unique value serialization strat.
+ private static final ScopedRowKeySerializer<TypeField> ROW_KEY_SER =
+ new ScopedRowKeySerializer<>( UniqueTypeFieldRowKeySerializer.get() );
+
+
+ private final EntityVersionSerializer ENTITY_VERSION_SER = new EntityVersionSerializer();
+
+ private final MultiTenantColumnFamily<ScopedRowKey<TypeField>, EntityVersion> CF_UNIQUE_VALUES =
+ new MultiTenantColumnFamily<>( "Unique_Values_V2", ROW_KEY_SER, ENTITY_VERSION_SER );
+
+ private com.netflix.astyanax.Keyspace keyspace;
+
+ private MvccEntitySerializationStrategy mvccEntitySerializationStrategy;
+
+ private UniqueValueSerializationStrategy uniqueValueSerializationStrategy;
+
+ private EntityManager em;
+
+ @Override
+ @SuppressWarnings( "static-access" )
+ public Options createOptions() {
+
+
+ Options options = super.createOptions();
+
+
+ Option appOption = OptionBuilder.withArgName( APPLICATION_ARG ).hasArg().isRequired( true )
+ .withDescription( "application id" ).create( APPLICATION_ARG );
+
+
+ options.addOption( appOption );
+
+ Option collectionOption =
+ OptionBuilder.withArgName(ENTITY_TYPE_ARG).hasArg().isRequired( true ).withDescription( "collection name" )
+ .create(ENTITY_TYPE_ARG);
+
+ options.addOption( collectionOption );
+
+ Option specificEntityNameOption =
+ OptionBuilder.withArgName(ENTITY_NAME_ARG).hasArg().isRequired( true ).withDescription( "specific entity name" )
+ .create(ENTITY_NAME_ARG);
+
+ options.addOption( specificEntityNameOption );
+
+
+ return options;
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.usergrid.tools.ToolBase#runTool(org.apache.commons.cli.CommandLine)
+ */
+ @Override
+ public void runTool( CommandLine line ) throws Exception {
+
+ startSpring();
+
+ UUID appToFilter = null;
+ if (!line.getOptionValue(APPLICATION_ARG).isEmpty()) {
+ appToFilter = UUID.fromString(line.getOptionValue(APPLICATION_ARG));
+ }
+
+
+ logger.info("Starting entity unique scanner");
+
+ keyspace = injector.getInstance(com.netflix.astyanax.Keyspace.class);
+ mvccEntitySerializationStrategy = injector.getInstance(MvccEntitySerializationStrategy.class);
+ uniqueValueSerializationStrategy = injector.getInstance(UniqueValueSerializationStrategy.class);
+
+
+ String entityType = line.getOptionValue(ENTITY_TYPE_ARG);
+ String entityName = line.getOptionValue(ENTITY_NAME_ARG);
+
+ if (entityName != null && !entityName.isEmpty()) {
+
+ if(appToFilter == null){
+ throw new RuntimeException("Cannot execute UniqueValueScanner with specific entity without the " +
+ "application UUID for which the entity should exist.");
+ }
+
+ if(entityType == null){
+ throw new RuntimeException("Cannot execute UniqueValueScanner without the entity type (singular " +
+ "collection name).");
+ }
+
+ //do stuff
+ UniqueValueSet uniqueValueSet = uniqueValueSerializationStrategy.load(
+ new ApplicationScopeImpl( new SimpleId(appToFilter, "application" ) ),
+ entityType,
+ Collections.singletonList(new StringField( "name", entityName) ));
+
+ logger.info("Returned unique value set from serialization load = {}", uniqueValueSet);
+
+ } else {
+
+ // scan through all unique values and log some info
+
+ Iterator<com.netflix.astyanax.model.Row<ScopedRowKey<TypeField>, EntityVersion>> rows = null;
+ try {
+
+ rows = keyspace.prepareQuery(CF_UNIQUE_VALUES)
+ .getAllRows()
+ .withColumnRange(new RangeBuilder().build())
+ .execute().getResult().iterator();
+
+ } catch (ConnectionException e) {
+
+ }
+
+
+ UUID finalAppToFilter = appToFilter;
+ rows.forEachRemaining(row -> {
+
+ String fieldName = row.getKey().getKey().getField().getName();
+ String scopeType = row.getKey().getScope().getType();
+ UUID scopeUUID = row.getKey().getScope().getUuid();
+
+ if (!fieldName.equalsIgnoreCase("name") ||
+ (finalAppToFilter != null && !finalAppToFilter.equals(scopeUUID))
+ ) {
+ // do nothing
+
+ } else {
+
+ if (em == null && finalAppToFilter.equals(scopeUUID)) {
+ em = emf.getEntityManager(scopeUUID);
+ }
+
+ Iterator<Column<EntityVersion>> columns = row.getColumns().iterator();
+ columns.forEachRemaining(column -> {
+
+ EntityVersion entityVersion = column.getName();
+
+ if (entityType != null &&
+ entityVersion.getEntityId().getType().equalsIgnoreCase(entityType)
+ ) {
+
+ String fieldValue = row.getKey().getKey().getField().getValue().toString();
+
+ logger.trace(
+ scopeType + ": " + scopeUUID + ", " +
+ fieldName + ": " + fieldValue + ", " +
+ "entity type: " + entityVersion.getEntityId().getType() + ", " +
+ "entity uuid: " + entityVersion.getEntityId().getUuid()
+ );
+
+
+ Entity entity = em.getUniqueEntityFromAlias(entityType, fieldValue, false);
+
+// Optional<MvccEntity> entity = mvccEntitySerializationStrategy.
+// load(new ApplicationScopeImpl(new SimpleId(scopeUUID, scopeType)), entityVersion.getEntityId());
+//
+// if(!entity.isPresent()){
+
+ if (entity == null) {
+
+ logger.error("{}: {}. Entity with type=[{}], name=[{}], and uuid=[{}] has a unique value entry " +
+ "but cannot be loaded from Mvcc entity serialization",
+ scopeType,
+ scopeUUID,
+ entityVersion.getEntityId().getType(),
+ fieldValue,
+ entityVersion.getEntityId().getUuid());
+ }
+
+ } else {
+ // do nothing
+ }
+
+
+ });
+ }
+
+
+ });
+
+ }
+ }
+}
[27/38] usergrid git commit: Hook ReservationCache in via
ClusterClients
Posted by sn...@apache.org.
Hook ReservationCache in via ClusterClients
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/2fb3ab32
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/2fb3ab32
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/2fb3ab32
Branch: refs/heads/usergrid-1268-akka-211
Commit: 2fb3ab32bca20be4c9133e340cb97145ca452a3c
Parents: d12307b
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Jun 24 11:34:53 2016 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Jun 24 11:34:53 2016 -0400
----------------------------------------------------------------------
.../corepersistence/CpEntityManagerFactory.java | 2 +-
.../actorsystem/ActorSystemManager.java | 36 ++++++++++++++-
.../actorsystem/ActorSystemManagerImpl.java | 24 +++++++++-
.../uniquevalues/ReservationCacheActor.java | 4 +-
.../uniquevalues/UniqueValueActor.java | 27 ++++++-----
.../uniquevalues/UniqueValuesServiceImpl.java | 47 ++++++++------------
.../collection/AbstractUniqueValueTest.java | 2 +-
7 files changed, 96 insertions(+), 46 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/2fb3ab32/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
index 060ec18..eca5927 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
@@ -155,7 +155,7 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
actorSystemManager.registerMessageType( UniqueValueActor.Cancellation.class, "/user/uvProxy" );
actorSystemManager.registerMessageType( UniqueValueActor.Confirmation.class, "/user/uvProxy" );
actorSystemManager.start();
- actorSystemManager.waitForClientActors();
+ actorSystemManager.waitForClientActor();
} catch (Throwable t) {
logger.error("Error starting Akka", t);
http://git-wip-us.apache.org/repos/asf/usergrid/blob/2fb3ab32/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManager.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManager.java b/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManager.java
index c45ccac..cdb6caf 100644
--- a/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManager.java
+++ b/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManager.java
@@ -23,21 +23,55 @@ import akka.actor.ActorRef;
public interface ActorSystemManager {
+ /**
+ * Start create and start all Akka Actors, ClusterClients Routers and etc.
+ */
void start();
+ /**
+ * Start method used in JUnit tests.
+ */
void start(String hostname, Integer port, String currentRegion);
- void waitForClientActors();
+ /**
+ * Wait until ClientActor has seen some nodes and is ready for use.
+ */
+ void waitForClientActor();
+ /**
+ * True if ActorSystem and ClientActor are ready to be used.
+ */
boolean isReady();
+ /**
+ * MUST be called before start() to register any router producers to be configured.
+ */
void registerRouterProducer( RouterProducer routerProducer );
+ /**
+ * MUST be called before start() to register any messages to be sent.
+ * @param messageType Class of message.
+ * @param routerPath Router-path to which such messages are to be sent.
+ */
void registerMessageType( Class messageType, String routerPath );
+ /**
+ * Local client for ActorSystem, send all local messages here for routing.
+ */
ActorRef getClientActor();
+ /**
+ * Get ClientClient for specified remote region.
+ */
ActorRef getClusterClient(String region );
+ /**
+ * Get name of of this, the current region.
+ */
String getCurrentRegion();
+
+ /**
+ * Publish message to all topic subscribers in all regions.
+ */
+ void publishToAllRegions( String topic, Object message, ActorRef sender );
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/2fb3ab32/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java b/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
index 5e23c20..89980bc 100644
--- a/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
+++ b/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
@@ -23,6 +23,8 @@ import akka.actor.*;
import akka.cluster.client.ClusterClient;
import akka.cluster.client.ClusterClientReceptionist;
import akka.cluster.client.ClusterClientSettings;
+import akka.cluster.pubsub.DistributedPubSub;
+import akka.cluster.pubsub.DistributedPubSubMediator;
import akka.pattern.Patterns;
import akka.util.Timeout;
import com.google.common.collect.ArrayListMultimap;
@@ -56,6 +58,8 @@ public class ActorSystemManagerImpl implements ActorSystemManager {
private final Map<Class, String> routersByMessageType = new HashMap<>();
private final Map<String, ActorRef> clusterClientsByRegion = new HashMap<String, ActorRef>(20);
+ private ActorRef mediator;
+
private ActorRef clientActor;
private ListMultimap<String, String> seedsByRegion;
@@ -78,7 +82,7 @@ public class ActorSystemManagerImpl implements ActorSystemManager {
this.port = null;
initAkka();
- waitForClientActors();
+ waitForClientActor();
}
@@ -132,6 +136,20 @@ public class ActorSystemManagerImpl implements ActorSystemManager {
}
+ @Override
+ public void publishToAllRegions( String topic, Object message, ActorRef sender ) {
+
+ // send to local subscribers to topic
+ mediator.tell( new DistributedPubSubMediator.Publish( topic, message ), sender );
+
+ // send to each ClusterClient
+ for ( ActorRef clusterClient : clusterClientsByRegion.values() ) {
+ clusterClient.tell( new ClusterClient.Publish( topic, message ), sender );
+ }
+
+ }
+
+
private void initAkka() {
logger.info("Initializing Akka");
@@ -171,6 +189,8 @@ public class ActorSystemManagerImpl implements ActorSystemManager {
for ( RouterProducer routerProducer : routerProducers ) {
routerProducer.createLocalSystemActors( localSystem );
}
+
+ mediator = DistributedPubSub.get( localSystem ).mediator();
}
@@ -359,7 +379,7 @@ public class ActorSystemManagerImpl implements ActorSystemManager {
@Override
- public void waitForClientActors() {
+ public void waitForClientActor() {
waitForClientActor( clientActor );
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/2fb3ab32/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/ReservationCacheActor.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/ReservationCacheActor.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/ReservationCacheActor.java
index 2912c7d..51f5c8c 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/ReservationCacheActor.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/ReservationCacheActor.java
@@ -49,7 +49,7 @@ public class ReservationCacheActor extends UntypedActor {
ReservationCache.getInstance().cacheReservation( res );
if ( ++reservationCount % 10 == 0 ) {
- logger.debug("Received {} reservations cache size {}",
+ logger.info("Received {} reservations cache size {}",
reservationCount, ReservationCache.getInstance().getSize());
}
@@ -58,7 +58,7 @@ public class ReservationCacheActor extends UntypedActor {
ReservationCache.getInstance().cancelReservation( can );
if ( ++cancellationCount % 10 == 0 ) {
- logger.debug("Received {} cancellations", cancellationCount);
+ logger.info("Received {} cancellations", cancellationCount);
}
} else if (msg instanceof DistributedPubSubMediator.SubscribeAck) {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/2fb3ab32/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValueActor.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValueActor.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValueActor.java
index e53710c..a14c63e 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValueActor.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValueActor.java
@@ -21,6 +21,7 @@ import akka.actor.UntypedActor;
import akka.cluster.pubsub.DistributedPubSub;
import akka.cluster.pubsub.DistributedPubSubMediator;
import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.usergrid.persistence.actorsystem.ActorSystemManager;
import org.apache.usergrid.persistence.core.scope.ApplicationScope;
import org.apache.usergrid.persistence.model.entity.Id;
import org.apache.usergrid.persistence.model.field.Field;
@@ -30,6 +31,7 @@ import org.slf4j.LoggerFactory;
import java.io.Serializable;
import java.util.UUID;
+
public class UniqueValueActor extends UntypedActor {
private static final Logger logger = LoggerFactory.getLogger( UniqueValueActor.class );
@@ -37,7 +39,7 @@ public class UniqueValueActor extends UntypedActor {
//private MetricsService metricsService;
- final private ActorRef mediator = DistributedPubSub.get(getContext().system()).mediator();
+ private final ActorSystemManager actorSystemManager;
private final UniqueValuesTable table;
@@ -48,6 +50,8 @@ public class UniqueValueActor extends UntypedActor {
// TODO: is there a way to avoid this ugly kludge? see also: ClusterSingletonRouter
this.table = UniqueValuesServiceImpl.injector.getInstance( UniqueValuesTable.class );
+ this.actorSystemManager = UniqueValuesServiceImpl.injector.getInstance( ActorSystemManager.class );
+
//logger.info("UniqueValueActor {} is live with table {}", name, table);
}
@@ -66,7 +70,7 @@ public class UniqueValueActor extends UntypedActor {
if ( message instanceof Reservation ) {
Reservation res = (Reservation) message;
-// final Timer.Context context = metricsService.getReservationTimer().time();
+ // final Timer.Context context = metricsService.getReservationTimer().time();
try {
Id owner = table.lookupOwner( res.getApplicationScope(), res.getOwner().getType(), res.getField() );
@@ -86,8 +90,7 @@ public class UniqueValueActor extends UntypedActor {
getSender().tell( new Response( Response.Status.IS_UNIQUE ), getSender() );
- mediator.tell( new DistributedPubSubMediator.Publish( "content",
- new Reservation( res ) ), getSelf() );
+ actorSystemManager.publishToAllRegions( "content", new Reservation( res ), getSelf() );
} catch (Throwable t) {
@@ -96,13 +99,13 @@ public class UniqueValueActor extends UntypedActor {
} finally {
-// context.stop();
+ // context.stop();
}
} else if ( message instanceof Confirmation) {
Confirmation con = (Confirmation) message;
-// final Timer.Context context = metricsService.getCommitmentTimer().time();
+ // final Timer.Context context = metricsService.getCommitmentTimer().time();
try {
Id owner = table.lookupOwner( con.getApplicationScope(), con.getOwner().getType(), con.getField() );
@@ -122,15 +125,14 @@ public class UniqueValueActor extends UntypedActor {
getSender().tell( new Response( Response.Status.IS_UNIQUE ), getSender() );
- mediator.tell( new DistributedPubSubMediator.Publish( "content",
- new Reservation( con ) ), getSelf() );
+ actorSystemManager.publishToAllRegions( "content", new Reservation( con ), getSelf() );
} catch (Throwable t) {
getSender().tell( new Response( Response.Status.ERROR ), getSender() );
logger.error( "Error processing request", t );
} finally {
-// context.stop();
+ // context.stop();
}
@@ -155,8 +157,7 @@ public class UniqueValueActor extends UntypedActor {
getSender().tell( new Response( Response.Status.SUCCESS ), getSender() );
- mediator.tell( new DistributedPubSubMediator.Publish( "content",
- new Reservation( can ) ), getSelf() );
+ actorSystemManager.publishToAllRegions( "content", new Reservation( can ), getSelf() );
} catch (Throwable t) {
getSender().tell( new Response( Response.Status.ERROR ), getSender() );
@@ -180,10 +181,12 @@ public class UniqueValueActor extends UntypedActor {
final String consistentHashKey;
public Request( ApplicationScope applicationScope, Id owner, UUID ownerVersion, Field field ) {
+
this.applicationScope = applicationScope;
this.owner = owner;
this.ownerVersion = ownerVersion;
this.field = field;
+
StringBuilder sb = new StringBuilder();
sb.append( applicationScope.getApplication() );
sb.append(":");
@@ -195,10 +198,12 @@ public class UniqueValueActor extends UntypedActor {
this.consistentHashKey = sb.toString();
}
public Request( Request req ) {
+
this.applicationScope = req.applicationScope;
this.owner = req.owner;
this.ownerVersion = req.ownerVersion;
this.field = req.field;
+
StringBuilder sb = new StringBuilder();
sb.append( req.applicationScope.getApplication() );
sb.append(":");
http://git-wip-us.apache.org/repos/asf/usergrid/blob/2fb3ab32/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceImpl.java
index b888b1f..352c2e5 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/uniquevalues/UniqueValuesServiceImpl.java
@@ -82,17 +82,10 @@ public class UniqueValuesServiceImpl implements UniqueValuesService {
}
- // TODO: restore reservation cache
-// private void subscribeToReservations( ActorSystem localSystem, Map<String, ActorSystem> systemMap ) {
-//
-// for ( String region : systemMap.keySet() ) {
-// ActorSystem actorSystem = systemMap.get( region );
-// if ( !actorSystem.equals( localSystem ) ) {
-// logger.info("Starting ReservationCacheUpdater for {}", region );
-// actorSystem.actorOf( Props.create( ReservationCacheActor.class ), "subscriber");
-// }
-// }
-// }
+ private void subscribeToReservations( ActorSystem localSystem ) {
+ logger.info("Starting ReservationCacheUpdater");
+ localSystem.actorOf( Props.create( ReservationCacheActor.class ), "subscriber");
+ }
@Override
@@ -166,9 +159,9 @@ public class UniqueValuesServiceImpl implements UniqueValuesService {
scope, entity.getId(), version, field );
UniqueValueActor.Reservation res = reservationCache.get( request.getConsistentHashKey() );
-// if ( res != null ) {
-// getCacheCounter().inc();
-// }
+ // if ( res != null ) {
+ // getCacheCounter().inc();
+ // }
if ( res != null && !res.getOwner().equals( request.getOwner() )) {
throw new UniqueValueException( "Error property not unique (cache)", field);
}
@@ -194,10 +187,14 @@ public class UniqueValuesServiceImpl implements UniqueValuesService {
scope, entity.getId(), version, field );
if ( actorSystemManager.getCurrentRegion().equals( region ) ) {
+
+ // sending to current region, use local clientActor
ActorRef clientActor = actorSystemManager.getClientActor();
clientActor.tell( request, null );
} else {
+
+ // sending to remote region, send via cluster client for that region
ActorRef clusterClient = actorSystemManager.getClusterClient( region );
clusterClient.tell( new ClusterClient.Send("/user/clientActor", request), null );
}
@@ -205,16 +202,6 @@ public class UniqueValuesServiceImpl implements UniqueValuesService {
}
-// private ActorRef lookupRequestActorForType( String type ) {
-// final String region = getRegionsByType().get( type );
-// ActorRef requestActor = getRequestActorsByRegion().get( region == null ? currentRegion : region );
-// if ( requestActor == null ) {
-// throw new RuntimeException( "No request actor available for region: " + region );
-// }
-// return requestActor;
-// }
-
-
private void sendUniqueValueRequest(
Entity entity, String region, UniqueValueActor.Request request ) throws UniqueValueException {
@@ -226,19 +213,22 @@ public class UniqueValuesServiceImpl implements UniqueValuesService {
try {
Timeout t = new Timeout( 1, TimeUnit.SECONDS );
- // ask RequestActor and wait (up to timeout) for response
-
Future<Object> fut;
if ( actorSystemManager.getCurrentRegion().equals( region ) ) {
+
+ // sending to current region, use local clientActor
ActorRef clientActor = actorSystemManager.getClientActor();
fut = Patterns.ask( clientActor, request, t );
} else {
+
+ // sending to remote region, send via cluster client for that region
ActorRef clusterClient = actorSystemManager.getClusterClient( region );
fut = Patterns.ask( clusterClient, new ClusterClient.Send("/user/clientActor", request), t );
}
+ // wait (up to timeout) for response
response = (UniqueValueActor.Response) Await.result( fut, t.duration() );
if ( response != null && (
@@ -306,8 +296,7 @@ public class UniqueValuesServiceImpl implements UniqueValuesService {
@Override
public void createLocalSystemActors( ActorSystem localSystem ) {
- // TODO: restore reservation cache
- //subscribeToReservations( localSystem );
+ subscribeToReservations( localSystem );
}
@Override
@@ -317,6 +306,8 @@ public class UniqueValuesServiceImpl implements UniqueValuesService {
Map<String, Object> akka = (Map<String, Object>)configMap.get("akka");
+ // TODO: replace this configuration stuff with equivalent Java code in the above "create" methods
+
akka.put( "actor", new HashMap<String, Object>() {{
put( "deployment", new HashMap<String, Object>() {{
put( "/uvRouter/singleton/router", new HashMap<String, Object>() {{
http://git-wip-us.apache.org/repos/asf/usergrid/blob/2fb3ab32/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/AbstractUniqueValueTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/AbstractUniqueValueTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/AbstractUniqueValueTest.java
index 041835b..e7b4450 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/AbstractUniqueValueTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/AbstractUniqueValueTest.java
@@ -41,7 +41,7 @@ public class AbstractUniqueValueTest {
actorSystemManager.registerMessageType( UniqueValueActor.Cancellation.class, "/user/uvProxy" );
actorSystemManager.registerMessageType( UniqueValueActor.Confirmation.class, "/user/uvProxy" );
actorSystemManager.start( "127.0.0.1", port, "us-east" );
- actorSystemManager.waitForRequestActors();
+ actorSystemManager.waitForClientActor();
startedAkka.put( port, true );
}
[35/38] usergrid git commit: Add missing property
Posted by sn...@apache.org.
Add missing property
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/ca9383b2
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/ca9383b2
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/ca9383b2
Branch: refs/heads/usergrid-1268-akka-211
Commit: ca9383b21efd17cc8c20314af12046e036e28be7
Parents: 14f5f7a
Author: Dave Johnson <sn...@apache.org>
Authored: Wed Jun 29 08:44:32 2016 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Wed Jun 29 08:44:32 2016 -0400
----------------------------------------------------------------------
stack/config/src/main/resources/usergrid-default.properties | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/ca9383b2/stack/config/src/main/resources/usergrid-default.properties
----------------------------------------------------------------------
diff --git a/stack/config/src/main/resources/usergrid-default.properties b/stack/config/src/main/resources/usergrid-default.properties
index 40557ba..29b8d36 100644
--- a/stack/config/src/main/resources/usergrid-default.properties
+++ b/stack/config/src/main/resources/usergrid-default.properties
@@ -439,6 +439,9 @@ collection.akka.region.seeds=
# Region MUST be in the region list specified in the 'usergrid.queue.regionList' property
collection.akka.authoritative.region=
+# Default number of Akka actors to start per instance / router producer
+collection.akka.instances-per-node=300
+
######################### Usergrid Unique Values Validation ##################
#
[29/38] usergrid git commit: Merge branch 'release-2.1.1' of
https://git-wip-us.apache.org/repos/asf/usergrid into release-2.1.1
Posted by sn...@apache.org.
Merge branch 'release-2.1.1' of https://git-wip-us.apache.org/repos/asf/usergrid into release-2.1.1
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/c4f72ef1
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c4f72ef1
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c4f72ef1
Branch: refs/heads/release-2.1.1
Commit: c4f72ef14b4005f7ac7316e43e84ae048054203a
Parents: cb90c0b e982ba4
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Jun 24 14:31:29 2016 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Jun 24 14:31:29 2016 -0400
----------------------------------------------------------------------
deployment/pcf/LICENSE | 201 ++++++++
deployment/pcf/README.md | 44 ++
deployment/pcf/addBlobs.sh | 25 +
deployment/pcf/apache-usergrid-tile-1.6.yml | 510 +++++++++++++++++++
deployment/pcf/config/blobs.yml | 19 +
deployment/pcf/config/final.yml | 24 +
deployment/pcf/content_migrations.yml | 53 ++
deployment/pcf/createRelease.sh | 24 +
deployment/pcf/createTile.sh | 32 ++
deployment/pcf/jobs/delete-all/monit | 17 +
deployment/pcf/jobs/delete-all/spec | 44 ++
.../jobs/delete-all/templates/delete-all.sh.erb | 131 +++++
deployment/pcf/jobs/deploy-all/monit | 18 +
deployment/pcf/jobs/deploy-all/spec | 145 ++++++
.../jobs/deploy-all/templates/deploy-all.sh.erb | 384 ++++++++++++++
.../pcf/jobs/docker-bosh-cassandra_docker/monit | 23 +
.../pcf/jobs/docker-bosh-cassandra_docker/spec | 26 +
.../docker-bosh-cassandra_docker.sh.erb | 69 +++
.../jobs/docker-bosh-elasticsearch_docker/monit | 23 +
.../jobs/docker-bosh-elasticsearch_docker/spec | 26 +
.../docker-bosh-elasticsearch_docker.sh.erb | 69 +++
.../pcf/packages/cassandra_docker/packaging | 26 +
deployment/pcf/packages/cassandra_docker/spec | 26 +
deployment/pcf/packages/cf_cli/packaging | 26 +
deployment/pcf/packages/cf_cli/spec | 25 +
deployment/pcf/packages/common/packaging | 23 +
deployment/pcf/packages/common/spec | 25 +
.../pcf/packages/elasticsearch_docker/packaging | 26 +
.../pcf/packages/elasticsearch_docker/spec | 26 +
deployment/pcf/packages/usergrid_app/packaging | 27 +
deployment/pcf/packages/usergrid_app/spec | 27 +
deployment/pcf/run.sh | 25 +
deployment/pcf/src/common/utils.sh | 107 ++++
deployment/pcf/src/templates/all_open.json | 6 +
deployment/pcf/src/usergrid_app/manifest.yml | 22 +
.../main/resources/usergrid-default.properties | 4 +
.../corepersistence/CpEntityManager.java | 38 +-
.../corepersistence/CpRelationManager.java | 32 +-
.../corepersistence/EntityManagerFig.java | 2 +-
.../asyncevents/AsyncEventService.java | 6 +-
.../asyncevents/AsyncEventServiceImpl.java | 45 +-
.../asyncevents/EventBuilder.java | 6 +-
.../asyncevents/EventBuilderImpl.java | 46 +-
.../model/DeIndexOldVersionsEvent.java | 12 +-
.../corepersistence/index/IndexService.java | 23 +-
.../corepersistence/index/IndexServiceImpl.java | 86 ++--
.../pipeline/cursor/CursorSerializerUtil.java | 9 -
.../pipeline/cursor/RequestCursor.java | 29 +-
.../usergrid/persistence/EntityManager.java | 2 +-
.../persistence/entities/Notification.java | 38 +-
.../collection/EntityCollectionManager.java | 13 +-
.../impl/EntityCollectionManagerImpl.java | 72 ++-
.../mvcc/stage/write/WriteUniqueVerify.java | 44 +-
.../serialization/SerializationFig.java | 5 +
.../UniqueValueSerializationStrategy.java | 3 +-
.../serialization/impl/LogEntryIterator.java | 128 +++++
.../UniqueValueSerializationStrategyImpl.java | 139 ++++-
.../collection/EntityCollectionManagerIT.java | 5 +-
...niqueValueSerializationStrategyImplTest.java | 218 +++++++-
.../graph/impl/GraphManagerImpl.java | 4 +
.../usergrid/persistence/index/EntityIndex.java | 5 +-
.../usergrid/persistence/index/IndexFig.java | 2 +-
.../index/impl/EsEntityIndexImpl.java | 64 +--
.../persistence/index/impl/EntityIndexTest.java | 41 --
stack/pom.xml | 2 -
.../security/SecuredResourceFilterFactory.java | 72 ++-
.../collection/CollectionsResourceIT.java | 87 +++-
.../collection/devices/DevicesResourceIT.java | 3 +-
.../usergrid/rest/management/AdminUsersIT.java | 80 +++
.../resource/endpoints/CollectionEndpoint.java | 24 +-
.../cassandra/ManagementServiceImpl.java | 33 +-
.../services/AbstractCollectionService.java | 49 +-
.../services/AbstractConnectionsService.java | 6 +-
.../services/devices/DevicesService.java | 2 +
.../impl/ApplicationQueueManagerImpl.java | 52 +-
.../AbstractServiceNotificationIT.java | 26 +-
stack/tools/pom.xml | 1 +
.../org/apache/usergrid/tools/ToolBase.java | 28 +-
.../usergrid/tools/UniqueValueScanner.java | 276 ++++++++++
.../main/resources/toolsApplicationContext.xml | 7 +
80 files changed, 3835 insertions(+), 358 deletions(-)
----------------------------------------------------------------------
[02/38] usergrid git commit: Add docs for application delete and
restore.
Posted by sn...@apache.org.
Add docs for application delete and restore.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/cb90c0bb
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/cb90c0bb
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/cb90c0bb
Branch: refs/heads/usergrid-1268-akka-211
Commit: cb90c0bb83ef9f6d0578dd92753d7a48ff73145a
Parents: cc7a867
Author: Dave Johnson <sn...@apache.org>
Authored: Mon Jun 6 16:42:34 2016 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Mon Jun 6 16:42:34 2016 -0400
----------------------------------------------------------------------
docs/orgs-and-apps/application.md | 104 +++++++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/cb90c0bb/docs/orgs-and-apps/application.md
----------------------------------------------------------------------
diff --git a/docs/orgs-and-apps/application.md b/docs/orgs-and-apps/application.md
index 801b9ef..f60f63f 100644
--- a/docs/orgs-and-apps/application.md
+++ b/docs/orgs-and-apps/application.md
@@ -98,3 +98,107 @@ Note: You also need to provide a valid access token with the API call. See [Auth
}
}
+
+## Deleting and restoring Applications
+Usergrid allows you to clean-up your Organizations by deleting old Applications that you no longer need.
+With this feature, Applications are not really deleted but they are hidden from view and may be restored later. (At some point in the future, Usergrid may get the ability to completely obliterate an Application, but that ability does not exist at the time of this writing.)
+
+### Delete Application: Request URI
+
+Only an authenticated Admin User can delete and restore Applications.
+To delete an application, you send an authenticated HTTP **DELETE** request to the /management end-point.
+The Request URI must specify the Organization and the Application, both by identifier (name or UUID).
+Here is the Request URI pattern:
+
+ /management/organizations|orgs/{org_name}|{uuid}/applications|apps/{app_name}
+
+Parameters
+
+This is intentionally redundant, but you must confirm that you really want to delete the Application
+by specifying its name or UUID, same as that which you used in the Request URI.
+
+Parameter Description
+--------- -----------
+string confirm_application_id Application identifier (either name or UUID)
+
+Note: You also need to provide a valid access token with the API call. See [Authenticating users and application clients](../security_and_auth/authenticating-users-and-application-clients.html) for details.
+
+
+### Delete Application: Example - Request
+
+This example deletes an aApplication named 'testapp1'
+
+ curl -X DELETE "https://api.usergrid.com/management/orgs/testorg/apps/testapp1?confirm_application_id=testapp1"
+
+### Delete Application: Example - Response
+
+The response echos back the action that was taken and the params, and an HTTP 200 OK status message confirms that the Application has been deleted.
+
+ HTTP/1.1 200 OK
+ Access-Control-Allow-Origin: *
+ Content-Length: 276
+ Content-Type: application/json
+ Date: Mon, 06 Jun 2016 18:52:04 GMT
+ Server: Apache-Coyote/1.1
+ Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 05-Jun-2016 18:52:04 GMT
+ {
+ "action": "delete",
+ "application": "d44dfc30-2c13-11e6-8b07-0a669fe1d66e",
+ "applicationName": "delete",
+ "duration": 3,
+ "organization": "test-organization",
+ "params": {
+ "confirm_application_identifier": [
+ "testapp1"
+ ]
+ },
+ "timestamp": 1465239124645
+ }
+
+
+### Restore Application: Request URI
+
+To Restore an Application that has been deleted you must know the Application's UUID. If you do a PUT to that application's old URI, using he UUID to identify it, then the Application will be restored.
+
+### Restore Application: Example - Request
+
+For example, to restore 'testapp1' that we deleted above:
+
+ curl -X PUT "https://api.usergrid.com/management/orgs/test-organization/apps/d44dfc30-2c13-11e6-8b07-0a669fe1d66e access_token==YWMtZR..."
+
+### Restore Application: Example - Response
+
+Here's the response that indicates via HTTP 200 OK that the Application has been restored.
+
+ HTTP/1.1 200 OK
+ Access-Control-Allow-Origin: *
+ Content-Length: 223
+ Content-Type: application/json
+ Date: Mon, 06 Jun 2016 19:03:16 GMT
+ Server: Apache-Coyote/1.1
+ Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Sun, 05-Jun-2016 19:03:16 GMT
+
+ {
+ "action": "restore",
+ "application": "d44dfc30-2c13-11e6-8b07-0a669fe1d66e",
+ "applicationName": "delete",
+ "duration": 3,
+ "organization": "test-organization",
+ "params": {},
+ "timestamp": 1465239796913
+ }
+
+### Application Delete and Restore Limitations
+
+At the time of this writing there are a couple of limitations regarding Application Delete and Restore:
+
+* Within an Organization, you cannot delete an Application with the same name as an Application that you have deleted before.
+* Within an Organization, you cannot restore an Application is an application with the very same name has been added since the orginal one was deleted.
+
+Hopefully, these unnecessary limitations will be fixed soon; they are tracked by this JIRA issue [USERGRID-1299](https://issues.apache.org/jira/browse/USERGRID-1299)
+
+
+
+
+
+
\ No newline at end of file
[28/38] usergrid git commit: Merge branch 'release-2.1.1' of
https://git-wip-us.apache.org/repos/asf/usergrid into release-2.1.1
Posted by sn...@apache.org.
Merge branch 'release-2.1.1' of https://git-wip-us.apache.org/repos/asf/usergrid into release-2.1.1
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/c4f72ef1
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c4f72ef1
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c4f72ef1
Branch: refs/heads/usergrid-1268-akka-211
Commit: c4f72ef14b4005f7ac7316e43e84ae048054203a
Parents: cb90c0b e982ba4
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Jun 24 14:31:29 2016 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Jun 24 14:31:29 2016 -0400
----------------------------------------------------------------------
deployment/pcf/LICENSE | 201 ++++++++
deployment/pcf/README.md | 44 ++
deployment/pcf/addBlobs.sh | 25 +
deployment/pcf/apache-usergrid-tile-1.6.yml | 510 +++++++++++++++++++
deployment/pcf/config/blobs.yml | 19 +
deployment/pcf/config/final.yml | 24 +
deployment/pcf/content_migrations.yml | 53 ++
deployment/pcf/createRelease.sh | 24 +
deployment/pcf/createTile.sh | 32 ++
deployment/pcf/jobs/delete-all/monit | 17 +
deployment/pcf/jobs/delete-all/spec | 44 ++
.../jobs/delete-all/templates/delete-all.sh.erb | 131 +++++
deployment/pcf/jobs/deploy-all/monit | 18 +
deployment/pcf/jobs/deploy-all/spec | 145 ++++++
.../jobs/deploy-all/templates/deploy-all.sh.erb | 384 ++++++++++++++
.../pcf/jobs/docker-bosh-cassandra_docker/monit | 23 +
.../pcf/jobs/docker-bosh-cassandra_docker/spec | 26 +
.../docker-bosh-cassandra_docker.sh.erb | 69 +++
.../jobs/docker-bosh-elasticsearch_docker/monit | 23 +
.../jobs/docker-bosh-elasticsearch_docker/spec | 26 +
.../docker-bosh-elasticsearch_docker.sh.erb | 69 +++
.../pcf/packages/cassandra_docker/packaging | 26 +
deployment/pcf/packages/cassandra_docker/spec | 26 +
deployment/pcf/packages/cf_cli/packaging | 26 +
deployment/pcf/packages/cf_cli/spec | 25 +
deployment/pcf/packages/common/packaging | 23 +
deployment/pcf/packages/common/spec | 25 +
.../pcf/packages/elasticsearch_docker/packaging | 26 +
.../pcf/packages/elasticsearch_docker/spec | 26 +
deployment/pcf/packages/usergrid_app/packaging | 27 +
deployment/pcf/packages/usergrid_app/spec | 27 +
deployment/pcf/run.sh | 25 +
deployment/pcf/src/common/utils.sh | 107 ++++
deployment/pcf/src/templates/all_open.json | 6 +
deployment/pcf/src/usergrid_app/manifest.yml | 22 +
.../main/resources/usergrid-default.properties | 4 +
.../corepersistence/CpEntityManager.java | 38 +-
.../corepersistence/CpRelationManager.java | 32 +-
.../corepersistence/EntityManagerFig.java | 2 +-
.../asyncevents/AsyncEventService.java | 6 +-
.../asyncevents/AsyncEventServiceImpl.java | 45 +-
.../asyncevents/EventBuilder.java | 6 +-
.../asyncevents/EventBuilderImpl.java | 46 +-
.../model/DeIndexOldVersionsEvent.java | 12 +-
.../corepersistence/index/IndexService.java | 23 +-
.../corepersistence/index/IndexServiceImpl.java | 86 ++--
.../pipeline/cursor/CursorSerializerUtil.java | 9 -
.../pipeline/cursor/RequestCursor.java | 29 +-
.../usergrid/persistence/EntityManager.java | 2 +-
.../persistence/entities/Notification.java | 38 +-
.../collection/EntityCollectionManager.java | 13 +-
.../impl/EntityCollectionManagerImpl.java | 72 ++-
.../mvcc/stage/write/WriteUniqueVerify.java | 44 +-
.../serialization/SerializationFig.java | 5 +
.../UniqueValueSerializationStrategy.java | 3 +-
.../serialization/impl/LogEntryIterator.java | 128 +++++
.../UniqueValueSerializationStrategyImpl.java | 139 ++++-
.../collection/EntityCollectionManagerIT.java | 5 +-
...niqueValueSerializationStrategyImplTest.java | 218 +++++++-
.../graph/impl/GraphManagerImpl.java | 4 +
.../usergrid/persistence/index/EntityIndex.java | 5 +-
.../usergrid/persistence/index/IndexFig.java | 2 +-
.../index/impl/EsEntityIndexImpl.java | 64 +--
.../persistence/index/impl/EntityIndexTest.java | 41 --
stack/pom.xml | 2 -
.../security/SecuredResourceFilterFactory.java | 72 ++-
.../collection/CollectionsResourceIT.java | 87 +++-
.../collection/devices/DevicesResourceIT.java | 3 +-
.../usergrid/rest/management/AdminUsersIT.java | 80 +++
.../resource/endpoints/CollectionEndpoint.java | 24 +-
.../cassandra/ManagementServiceImpl.java | 33 +-
.../services/AbstractCollectionService.java | 49 +-
.../services/AbstractConnectionsService.java | 6 +-
.../services/devices/DevicesService.java | 2 +
.../impl/ApplicationQueueManagerImpl.java | 52 +-
.../AbstractServiceNotificationIT.java | 26 +-
stack/tools/pom.xml | 1 +
.../org/apache/usergrid/tools/ToolBase.java | 28 +-
.../usergrid/tools/UniqueValueScanner.java | 276 ++++++++++
.../main/resources/toolsApplicationContext.xml | 7 +
80 files changed, 3835 insertions(+), 358 deletions(-)
----------------------------------------------------------------------
[33/38] usergrid git commit: Added app id to the other duplicate
unique value log.
Posted by sn...@apache.org.
Added app id to the other duplicate unique value log.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/09280b1f
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/09280b1f
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/09280b1f
Branch: refs/heads/usergrid-1268-akka-211
Commit: 09280b1fea81938576e8143cdc4047b41aae4350
Parents: 0c965ae
Author: Mike Dunker <md...@apigee.com>
Authored: Mon Jun 27 17:04:27 2016 -0700
Committer: Mike Dunker <md...@apigee.com>
Committed: Mon Jun 27 17:04:27 2016 -0700
----------------------------------------------------------------------
.../impl/UniqueValueSerializationStrategyImpl.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/09280b1f/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
index 28e28aa..aec2e58 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
@@ -361,9 +361,9 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
}else{
- logger.warn("Duplicate unique value [{}={}] found, removing newer entry " +
- "with entity id [{}] and entity version [{}]", field.getName(), field.getValue().toString(),
- uniqueValue.getEntityId().getUuid(), uniqueValue.getEntityVersion() );
+ logger.warn("Duplicate unique value [{}={}] found for application [{}], removing newer entry " +
+ "with entity id [{}] and entity version [{}].", field.getName(), field.getValue().toString(),
+ applicationId.getUuid(), uniqueValue.getEntityId().getUuid(), uniqueValue.getEntityVersion() );
// delete the duplicate from the unique value index
delete(appScope, uniqueValue ).execute();
[08/38] usergrid git commit: Add Pivotal Cloud Foundry source for
creating Usergrid Tile ( CF deployment + bosh release )
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/apache-usergrid-tile-1.6.yml
----------------------------------------------------------------------
diff --git a/deployment/pcf/apache-usergrid-tile-1.6.yml b/deployment/pcf/apache-usergrid-tile-1.6.yml
new file mode 100644
index 0000000..f45570d
--- /dev/null
+++ b/deployment/pcf/apache-usergrid-tile-1.6.yml
@@ -0,0 +1,510 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+---
+name: apache-usergrid
+label: Apache Usergrid - Open Source mBaaS
+description: Apache's only mBaaS project
+icon_image: iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAYAAACAvzbMAAAgAElEQVR4AezBsYEbARADMU4tVqFWMX9lmp6A0WafH8Dn+zRToUyFclQoU6EcFcpUKEeFMhXKUaFMhXJUKFOhHBXKVChHhTIVylGhTIVyVChToRwVylQoR4UyFcpRoUyFclQoU6EcFcpUKEeFMhXKUaFMhXJUKFOhHBXKVChHhTIVylGhTIVyVChToRwVylQoR4UyFcpRoUyFclQoU6EcFcpUKEeFMhXKUaFMhXJUKFOhHBXKVChHhTIVylGhTIVyVChToRwVylQoR4UyFcpRoUyFclQoU6EcFcpUKEeFMhWK+HyfZiqUqVCOCmUqlKNCmQrlqFCmQjkqlKlQjgplKpSjQpkK5ahQpkI5KpSpUI4KZSqUo0KZCuWoUKZCOSqUqVCOCmUqlKNCmQrlqFCmQjkqlKlQjgplKpSjQpkK5ahQpkI5KpSpUI4KZSqUo0KZCuWoUKZCOSqUqVCOCmUqlKNCmQrlqFCmQjkqlKlQjgplKpSjQpkK5ahQpkI5KpSpUI4KZSqUo0KZ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rjFcNAhwIBt/rr1xSzNTvPSsX18/tn9SKIvhVExE8MBG7fvc371OidX1ti484Ad4seLJAQUgwSTYwM+tW8Py0cXOH5wFgG9CzYMu471G3c5e+kqv/3ly4yKGXTip5X2v3LGVA4FlUNBw6GgcihoOBRUDgUNh4LKoaDhUFA5FDQcCsKAbAMyMOrN7O5Jlpf2cmJx3odnpiRgVAqdZIxubW5x8sIqpy9eYVQKxbaCMGFbQcOhoHIoaDgUVA4FlADBIgAAIABJREFUDYeCyqGgsbnde25qUi8cmuPFxXmO7Jn2xNhABgQ8GvVcu3mPUytrPnd5XQ+3ezqxw32xCEm8x6GgcihoOBRUDgWVbSrbaNiJn3vqw3zu6IL/9tNzenx8QCfRl0JfzDe+e8O///U3dfbSVR71hYGwwoAB8S6Hgsqh
oOFQUDkUNBwKKoeChkNB5VDQcCioHAoaDgWVQ8EOGxOGXzu64L/77D4dmplifNDRSQb0qC/80drb/O6lb3Pp2jvc3952J4m/YgUNh4LKoaDhUFA5FIQJm76Ypdlpv3Rsn15+7gA7+lI8KtbEcMDG7fucX73OyZU1Nu48MKBOYodDQcOhoHIoaDgUVA4FDYeCyqEgbCMJAcVYQrvGhzy/MMPy0QUfPzgrAb0LNgy7jvUbd3320lW9+trrbPeFQScraDgUVA4FDYeCyqGg4VBQORQ0HAoqh4KGQ0HlUNBwKKgcCkL7XzljKoeCyqGg4VBQORQ0HAoqh4KGQ0HlUNBwKKgcChoOBWFAtgEZGPVmdvcky0t7ObE478MzUxI
<TRUNCATED>
[37/38] usergrid git commit: Merge branch 'release-2.1.1' of
https://git-wip-us.apache.org/repos/asf/usergrid into release-2.1.1
Posted by sn...@apache.org.
Merge branch 'release-2.1.1' of https://git-wip-us.apache.org/repos/asf/usergrid into release-2.1.1
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/37c482c5
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/37c482c5
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/37c482c5
Branch: refs/heads/release-2.1.1
Commit: 37c482c5ee4175706a05034e8e3252d03f0b24f7
Parents: c4f72ef 9c4b524
Author: Dave Johnson <sn...@apache.org>
Authored: Wed Jun 29 08:45:25 2016 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Wed Jun 29 08:45:25 2016 -0400
----------------------------------------------------------------------
.../corepersistence/CpRelationManager.java | 40 ++++++++---------
.../asyncevents/EventBuilderImpl.java | 7 ++-
.../UniqueValueSerializationStrategyImpl.java | 11 ++---
.../index/impl/EsEntityIndexImpl.java | 47 +++++++-------------
4 files changed, 43 insertions(+), 62 deletions(-)
----------------------------------------------------------------------
[03/38] usergrid git commit: Update event handling to better handle
case when no index requests are returned from event processing.
Posted by sn...@apache.org.
Update event handling to better handle case when no index requests are returned from event processing.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/7af4f845
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/7af4f845
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/7af4f845
Branch: refs/heads/usergrid-1268-akka-211
Commit: 7af4f8454ff9f2270835a2983fa41c390d4602f5
Parents: 3df0779
Author: Michael Russo <mr...@apigee.com>
Authored: Tue Jun 14 13:57:14 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Tue Jun 14 13:57:14 2016 -0700
----------------------------------------------------------------------
.../asyncevents/AsyncEventServiceImpl.java | 31 +++++++++++++++-----
1 file changed, 24 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7af4f845/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java
index fa175ab..8d050fe 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java
@@ -355,6 +355,11 @@ public class AsyncEventServiceImpl implements AsyncEventService {
throw new Exception("Unknown EventType for message: "+ message.getStringBody().trim());
}
+ if( single.isEmpty() ){
+ logger.warn("No index operation messages came back from event processing for msg {} ",
+ message.getStringBody().trim());
+ }
+
// if no exception happens and the QueueMessage is returned in these results, it will get ack'd
return new IndexEventResult(Optional.of(single), Optional.of(message), thisEvent.getCreationTime());
@@ -370,8 +375,16 @@ public class AsyncEventServiceImpl implements AsyncEventService {
} catch (Exception e) {
+ // NPEs don't have a detail message, so add something for our log statement to identify better
+ final String errorMessage;
+ if( e instanceof NullPointerException ) {
+ errorMessage = "NullPointerException";
+ }else{
+ errorMessage = e.getMessage();
+ }
+
// if the event fails to process, log and return empty message result so it doesn't get ack'd
- logger.error("{}. Failed to process message: {}", e.getMessage(), message.getStringBody().trim() );
+ logger.error("{}. Failed to process message: {}", errorMessage, message.getStringBody().trim() );
return new IndexEventResult(Optional.absent(), Optional.absent(), thisEvent.getCreationTime());
}
});
@@ -427,7 +440,8 @@ public class AsyncEventServiceImpl implements AsyncEventService {
final EntityIndexOperation entityIndexOperation = new EntityIndexOperation( applicationScope, entityId, updatedAfter);
- return eventBuilder.buildEntityIndex( entityIndexOperation ).toBlocking().lastOrDefault(null);
+ // default this observable's return to empty index operation message if nothing is emitted
+ return eventBuilder.buildEntityIndex( entityIndexOperation ).toBlocking().lastOrDefault(new IndexOperationMessage());
}
@@ -453,9 +467,10 @@ public class AsyncEventServiceImpl implements AsyncEventService {
final EntityCollectionManager ecm = entityCollectionManagerFactory.createCollectionManager( edgeIndexEvent.getApplicationScope() );
+ // default this observable's return to empty index operation message if nothing is emitted
return ecm.load( edgeIndexEvent.getEntityId() )
.flatMap( loadedEntity -> eventBuilder.buildNewEdge(edgeIndexEvent.getApplicationScope(), loadedEntity, edgeIndexEvent.getEdge()) )
- .toBlocking().lastOrDefault(null);
+ .toBlocking().lastOrDefault(new IndexOperationMessage());
}
@@ -487,7 +502,8 @@ public class AsyncEventServiceImpl implements AsyncEventService {
logger.debug("Deleting in app scope {} with edge {}", applicationScope, edge);
}
- return eventBuilder.buildDeleteEdge(applicationScope, edge).toBlocking().lastOrDefault(null);
+ // default this observable's return to empty index operation message if nothing is emitted
+ return eventBuilder.buildDeleteEdge(applicationScope, edge).toBlocking().lastOrDefault(new IndexOperationMessage());
}
@@ -600,9 +616,9 @@ public class AsyncEventServiceImpl implements AsyncEventService {
final Id entityId = deIndexOldVersionsEvent.getEntityIdScope().getId();
final UUID markedVersion = deIndexOldVersionsEvent.getMarkedVersion();
+ // default this observable's return to empty index operation message if nothing is emitted
return eventBuilder.deIndexOldVersions( applicationScope, entityId, markedVersion )
- .toBlocking().lastOrDefault(null);
-
+ .toBlocking().lastOrDefault(new IndexOperationMessage());
}
@@ -675,7 +691,8 @@ public class AsyncEventServiceImpl implements AsyncEventService {
entityDeleteResults.getCompactedNode().toBlocking().lastOrDefault(null);
- return entityDeleteResults.getIndexObservable().toBlocking().lastOrDefault(null);
+ // default this observable's return to empty index operation message if nothing is emitted
+ return entityDeleteResults.getIndexObservable().toBlocking().lastOrDefault(new IndexOperationMessage());
}
[16/38] usergrid git commit: Allow tools to always be built,
but skip its tests for now. Also fix issue with tools ability to have
custom properties set in ToolBase or command line execution.
Posted by sn...@apache.org.
Allow tools to always be built, but skip its tests for now. Also fix issue with tools ability to have custom properties set in ToolBase or command line execution.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/1997b579
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/1997b579
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/1997b579
Branch: refs/heads/usergrid-1268-akka-211
Commit: 1997b579cc780ef169c34d296dec953c91d2c4c5
Parents: 06f77d7
Author: Michael Russo <mr...@apigee.com>
Authored: Fri Jun 3 13:29:34 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Tue Jun 21 14:30:00 2016 -0700
----------------------------------------------------------------------
stack/pom.xml | 2 --
stack/tools/pom.xml | 1 +
.../org/apache/usergrid/tools/ToolBase.java | 28 ++++++++++++++++++--
.../main/resources/toolsApplicationContext.xml | 7 +++++
4 files changed, 34 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/1997b579/stack/pom.xml
----------------------------------------------------------------------
diff --git a/stack/pom.xml b/stack/pom.xml
index a94233e..dd35891 100644
--- a/stack/pom.xml
+++ b/stack/pom.xml
@@ -195,9 +195,7 @@
<module>core</module>
<module>services</module>
<module>rest</module>
- <!-- Tools should be built separately
<module>tools</module>
- -->
<!--
<module>websocket</module>
-->
http://git-wip-us.apache.org/repos/asf/usergrid/blob/1997b579/stack/tools/pom.xml
----------------------------------------------------------------------
diff --git a/stack/tools/pom.xml b/stack/tools/pom.xml
index 2d6e7a2..06691de 100644
--- a/stack/tools/pom.xml
+++ b/stack/tools/pom.xml
@@ -65,6 +65,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
+ <skipTests>true</skipTests>
<systemPropertyVariables>
<storage-config>${basedir}/src/test/conf</storage-config>
</systemPropertyVariables>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/1997b579/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java b/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java
index bd8686e..e82e5f8 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java
@@ -17,6 +17,7 @@
package org.apache.usergrid.tools;
+import com.google.inject.Injector;
import me.prettyprint.hector.testutils.EmbeddedServerHelper;
import org.apache.commons.cli.*;
import org.apache.commons.lang.ClassUtils;
@@ -69,6 +70,10 @@ public abstract class ToolBase {
protected CassandraService cass;
+ protected Injector injector;
+
+
+
public void startTool( String[] args ) {
startTool( args, true );
@@ -88,6 +93,15 @@ public abstract class ToolBase {
return;
}
+ // notification queue listener not needed for tools
+ System.setProperty("usergrid.notifications.listener.run", "false");
+ System.setProperty("usergrid.push.worker_count", "0");
+
+ //job scheduler also not needed for tools
+ System.setProperty("usergrid.scheduler.enabled", "false");
+
+
+
if ( line.hasOption( "host" ) ) {
System.setProperty( "cassandra.url", line.getOptionValue( "host" ) );
System.setProperty( "elasticsearch.hosts", line.getOptionValue( "eshost" ) );
@@ -178,6 +192,10 @@ public abstract class ToolBase {
assertNotNull( emf );
assertTrue( "EntityManagerFactory is instance of EntityManagerFactory",
emf instanceof EntityManagerFactory );
+
+ injector = ac.getBean( Injector.class );
+
+
}
@@ -256,7 +274,10 @@ public abstract class ToolBase {
" cassandra.keyspace.application: {}\n" +
" cassandra.lock.keyspace: {}\n" +
" cassandra.keyspace.replication: {}\n" +
- " cassandra.connections: {}\n",
+ " cassandra.connections: {}\n" +
+ " usergrid.notifications.listener.run: {}\n" +
+ " usergrid.push.worker_count: {}\n" +
+ " usergrid.scheduler.enabled: {}\n",
properties.get("cassandra.url"),
properties.get("cassandra.datacenter.local"),
properties.get("cassandra.username"),
@@ -265,7 +286,10 @@ public abstract class ToolBase {
properties.get("cassandra.keyspace.application"),
properties.get("cassandra.lock.keyspace"),
properties.get("cassandra.keyspace.replication"),
- properties.get("cassandra.connections")
+ properties.get("cassandra.connections"),
+ properties.get("usergrid.notifications.listener.run"),
+ properties.get("usergrid.push.worker_count"),
+ properties.get("usergrid.scheduler.enabled")
);
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/1997b579/stack/tools/src/main/resources/toolsApplicationContext.xml
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/resources/toolsApplicationContext.xml b/stack/tools/src/main/resources/toolsApplicationContext.xml
index 7e55893..f84501d 100644
--- a/stack/tools/src/main/resources/toolsApplicationContext.xml
+++ b/stack/tools/src/main/resources/toolsApplicationContext.xml
@@ -39,6 +39,8 @@
<bean id="properties"
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
+ <property name="properties" ref="sysProps"/>
+ <property name="localOverride" value="true"/>
<property name="singleton" value="true" />
<property name="ignoreResourceNotFound" value="true" />
<property name="locations">
@@ -50,6 +52,11 @@
</property>
</bean>
+ <bean id="sysProps" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+ <property name="targetClass"><value>java.lang.System</value></property>
+ <property name="targetMethod"><value>getProperties</value></property>
+ </bean>
+
<bean id="propertyPlaceholderConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="properties" ref="properties" />
[12/38] usergrid git commit: Add additional logging around read
repair to assist in troubleshooting.
Posted by sn...@apache.org.
Add additional logging around read repair to assist in troubleshooting.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/57089ee7
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/57089ee7
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/57089ee7
Branch: refs/heads/usergrid-1268-akka-211
Commit: 57089ee7d0484b3849c95d2d91203b04097e8657
Parents: 8024168
Author: Michael Russo <mr...@apigee.com>
Authored: Wed Jun 15 21:35:45 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Wed Jun 15 21:35:45 2016 -0700
----------------------------------------------------------------------
.../usergrid/corepersistence/CpEntityManager.java | 10 ++++++++++
.../collection/impl/EntityCollectionManagerImpl.java | 15 +++++++++++++++
2 files changed, 25 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/57089ee7/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
index fd31cf6..a2813ef 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
@@ -600,6 +600,11 @@ public class CpEntityManager implements EntityManager {
}
}
catch ( WriteUniqueVerifyException wuve ) {
+
+ if(logger.isTraceEnabled()){
+ logger.trace("WriteUniqueVerifyException encountered during update of entity with id {}",
+ cpEntity.getId().getUuid());
+ }
handleWriteUniqueVerifyException( entity, wuve );
}
@@ -2824,6 +2829,11 @@ public class CpEntityManager implements EntityManager {
}
catch ( WriteUniqueVerifyException wuve ) {
+
+ if(logger.isTraceEnabled()){
+ logger.trace("WriteUniqueVerifyException encountered during batchCreate of entity with id {}",
+ cpEntity.getId().getUuid());
+ }
handleWriteUniqueVerifyException( entity, wuve );
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/57089ee7/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
index fcf1c6b..cc72e73 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
@@ -371,6 +371,15 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
//bad unique value, delete this, it's inconsistent
if ( entity == null || !entity.getEntity().isPresent() ) {
+
+ if(logger.isTraceEnabled()) {
+ logger.trace("Unique value [{}={}] does not have corresponding entity, executing " +
+ "read repair to remove stale unique value entry",
+ expectedUnique.getField().getName(),
+ expectedUnique.getField().getValue().toString()
+ );
+ }
+
final MutationBatch valueDelete =
uniqueValueSerializationStrategy.delete( applicationScope, expectedUnique );
@@ -389,11 +398,17 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
deleteBatch.execute();
+
// optionally sleep after read repair as some tasks immediately try to write after the delete
if ( serializationFig.getReadRepairDelay() > 0 ){
try {
+ if(logger.isTraceEnabled()) {
+ logger.trace("Sleeping {}ms after unique value read repair execution",
+ serializationFig.getReadRepairDelay());
+ }
+
Thread.sleep(Math.min(serializationFig.getReadRepairDelay(), 200L));
} catch (InterruptedException e) {
[13/38] usergrid git commit: Add additional trace logging around
unique values for troubleshooting assistance.
Posted by sn...@apache.org.
Add additional trace logging around unique values for troubleshooting assistance.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/f4599fbe
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/f4599fbe
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/f4599fbe
Branch: refs/heads/usergrid-1268-akka-211
Commit: f4599fbe42d9a1b82afdf9b6b99aab0077387eca
Parents: 57089ee
Author: Michael Russo <mr...@apigee.com>
Authored: Sun Jun 19 21:49:57 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Sun Jun 19 21:49:57 2016 -0700
----------------------------------------------------------------------
.../collection/mvcc/stage/write/WriteUniqueVerify.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f4599fbe/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
index 2c47bdb..afe681e 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
@@ -213,6 +213,16 @@ public class WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>>
final Id returnedEntityId = uniqueValue.getEntityId();
if ( !entity.getId().equals(returnedEntityId) ) {
+
+ if(logger.isTraceEnabled()) {
+ logger.trace("Violation occurred when verifying unique value [{}={}]. Returned entity id [{}] " +
+ "does not match expected entity id [{}]",
+ field.getName(), field.getValue().toString(),
+ returnedEntityId,
+ entity.getId()
+ );
+ }
+
uniquenessViolations.put( field.getName(), field );
}
}
[38/38] usergrid git commit: Merge branch 'release-2.1.1' into
usergrid-1268-akka-211
Posted by sn...@apache.org.
Merge branch 'release-2.1.1' into usergrid-1268-akka-211
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/639b421c
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/639b421c
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/639b421c
Branch: refs/heads/usergrid-1268-akka-211
Commit: 639b421cdaa585f877ad1c50e62fa36c52384762
Parents: ca9383b 37c482c
Author: Dave Johnson <sn...@apache.org>
Authored: Wed Jun 29 08:45:45 2016 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Wed Jun 29 08:45:45 2016 -0400
----------------------------------------------------------------------
.../corepersistence/CpRelationManager.java | 40 ++++++++---------
.../asyncevents/EventBuilderImpl.java | 7 ++-
.../UniqueValueSerializationStrategyImpl.java | 11 ++---
.../index/impl/EsEntityIndexImpl.java | 47 +++++++-------------
4 files changed, 43 insertions(+), 62 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/639b421c/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
----------------------------------------------------------------------
[32/38] usergrid git commit: Allow Akka authoritative region to be
null and if null, uses current region as authoritative region.
Posted by sn...@apache.org.
Allow Akka authoritative region to be null and if null, uses current region as authoritative region.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/14f5f7ab
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/14f5f7ab
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/14f5f7ab
Branch: refs/heads/usergrid-1268-akka-211
Commit: 14f5f7abd4e9275ce1aba3bfb1b92c97a780bf96
Parents: 25303e6
Author: Dave Johnson <sn...@apache.org>
Authored: Mon Jun 27 12:53:39 2016 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Mon Jun 27 12:53:39 2016 -0400
----------------------------------------------------------------------
.../usergrid/persistence/actorsystem/ActorSystemManagerImpl.java | 4 +++-
.../persistence/collection/mvcc/stage/write/WriteCommit.java | 3 +++
.../collection/mvcc/stage/write/WriteUniqueVerify.java | 3 +++
3 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/14f5f7ab/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java b/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
index 89980bc..05f837d 100644
--- a/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
+++ b/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java
@@ -172,7 +172,9 @@ public class ActorSystemManagerImpl implements ActorSystemManager {
}
if ( StringUtils.isEmpty( actorSystemFig.getAkkaAuthoritativeRegion() )) {
- throw new RuntimeException( "No value specified for " + ActorSystemFig.AKKA_AUTHORITATIVE_REGION);
+ logger.warn("No value for {} specified, will use current region as authoriative region",
+ ActorSystemFig.AKKA_AUTHORITATIVE_REGION);
+ //throw new RuntimeException( "No value specified for " + ActorSystemFig.AKKA_AUTHORITATIVE_REGION);
}
List regionList = Arrays.asList( actorSystemFig.getRegionList().toLowerCase().split(",") );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/14f5f7ab/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
index 267e793..65d1734 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java
@@ -135,6 +135,9 @@ public class WriteCommit implements Func1<CollectionIoEvent<MvccEntity>, Collect
if ( region == null ) {
region = actorSystemFig.getAkkaAuthoritativeRegion();
}
+ if ( region == null ) {
+ region = actorSystemFig.getRegion();
+ }
confirmUniqueFieldsAkka( mvccEntity, version, applicationScope, region );
} else {
confirmUniqueFields( mvccEntity, version, applicationScope, logMutation );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/14f5f7ab/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
index 92ea6aa..89431a7 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
@@ -123,6 +123,9 @@ public class WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>>
if ( region == null ) {
region = actorSystemFig.getAkkaAuthoritativeRegion();
}
+ if ( region == null ) {
+ region = actorSystemFig.getRegion();
+ }
try {
akkaUvService.reserveUniqueValues( applicationScope, entity, mvccEntity.getVersion(), region );
[30/38] usergrid git commit: Merge branch 'release-2.1.1' into
usergrid-1268-akka-211
Posted by sn...@apache.org.
Merge branch 'release-2.1.1' into usergrid-1268-akka-211
Conflicts:
stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/25303e6d
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/25303e6d
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/25303e6d
Branch: refs/heads/usergrid-1268-akka-211
Commit: 25303e6d04faf47162c8ac94466deec178b45326
Parents: 2fb3ab3 c4f72ef
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Jun 24 15:04:22 2016 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Jun 24 15:04:22 2016 -0400
----------------------------------------------------------------------
deployment/pcf/LICENSE | 201 ++++++++
deployment/pcf/README.md | 44 ++
deployment/pcf/addBlobs.sh | 25 +
deployment/pcf/apache-usergrid-tile-1.6.yml | 510 +++++++++++++++++++
deployment/pcf/config/blobs.yml | 19 +
deployment/pcf/config/final.yml | 24 +
deployment/pcf/content_migrations.yml | 53 ++
deployment/pcf/createRelease.sh | 24 +
deployment/pcf/createTile.sh | 32 ++
deployment/pcf/jobs/delete-all/monit | 17 +
deployment/pcf/jobs/delete-all/spec | 44 ++
.../jobs/delete-all/templates/delete-all.sh.erb | 131 +++++
deployment/pcf/jobs/deploy-all/monit | 18 +
deployment/pcf/jobs/deploy-all/spec | 145 ++++++
.../jobs/deploy-all/templates/deploy-all.sh.erb | 384 ++++++++++++++
.../pcf/jobs/docker-bosh-cassandra_docker/monit | 23 +
.../pcf/jobs/docker-bosh-cassandra_docker/spec | 26 +
.../docker-bosh-cassandra_docker.sh.erb | 69 +++
.../jobs/docker-bosh-elasticsearch_docker/monit | 23 +
.../jobs/docker-bosh-elasticsearch_docker/spec | 26 +
.../docker-bosh-elasticsearch_docker.sh.erb | 69 +++
.../pcf/packages/cassandra_docker/packaging | 26 +
deployment/pcf/packages/cassandra_docker/spec | 26 +
deployment/pcf/packages/cf_cli/packaging | 26 +
deployment/pcf/packages/cf_cli/spec | 25 +
deployment/pcf/packages/common/packaging | 23 +
deployment/pcf/packages/common/spec | 25 +
.../pcf/packages/elasticsearch_docker/packaging | 26 +
.../pcf/packages/elasticsearch_docker/spec | 26 +
deployment/pcf/packages/usergrid_app/packaging | 27 +
deployment/pcf/packages/usergrid_app/spec | 27 +
deployment/pcf/run.sh | 25 +
deployment/pcf/src/common/utils.sh | 107 ++++
deployment/pcf/src/templates/all_open.json | 6 +
deployment/pcf/src/usergrid_app/manifest.yml | 22 +
docs/orgs-and-apps/application.md | 104 ++++
.../main/resources/usergrid-default.properties | 4 +
.../corepersistence/CpEntityManager.java | 36 +-
.../corepersistence/CpRelationManager.java | 32 +-
.../asyncevents/AsyncEventServiceImpl.java | 34 +-
.../usergrid/persistence/EntityManager.java | 2 +-
.../collection/EntityCollectionManager.java | 3 +-
.../impl/EntityCollectionManagerImpl.java | 34 +-
.../mvcc/stage/write/WriteUniqueVerify.java | 48 +-
.../UniqueValueSerializationStrategy.java | 3 +-
.../UniqueValueSerializationStrategyImpl.java | 139 ++++-
.../collection/EntityCollectionManagerIT.java | 6 +-
...niqueValueSerializationStrategyImplTest.java | 218 +++++++-
.../graph/impl/GraphManagerImpl.java | 4 +
stack/pom.xml | 2 -
.../security/SecuredResourceFilterFactory.java | 72 ++-
.../collection/devices/DevicesResourceIT.java | 3 +-
.../usergrid/rest/management/AdminUsersIT.java | 80 +++
.../cassandra/ManagementServiceImpl.java | 33 +-
.../services/AbstractCollectionService.java | 49 +-
.../services/AbstractConnectionsService.java | 6 +-
.../services/devices/DevicesService.java | 2 +
stack/tools/pom.xml | 1 +
.../org/apache/usergrid/tools/ToolBase.java | 28 +-
.../usergrid/tools/UniqueValueScanner.java | 276 ++++++++++
.../main/resources/toolsApplicationContext.xml | 7 +
61 files changed, 3446 insertions(+), 104 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/25303e6d/stack/config/src/main/resources/usergrid-default.properties
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/25303e6d/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/25303e6d/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/25303e6d/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManager.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/25303e6d/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/25303e6d/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/25303e6d/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
----------------------------------------------------------------------
diff --cc stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
index 848ed2e,7b76dc8..92ea6aa
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
@@@ -47,15 -39,20 +47,12 @@@ import org.apache.usergrid.persistence.
import org.apache.usergrid.persistence.model.entity.Id;
import org.apache.usergrid.persistence.model.field.Field;
import org.apache.usergrid.persistence.model.util.EntityUtils;
-
-import com.google.common.base.Preconditions;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import com.netflix.astyanax.Keyspace;
-import com.netflix.astyanax.MutationBatch;
-import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
-import com.netflix.astyanax.model.ConsistencyLevel;
-import com.netflix.hystrix.HystrixCommand;
-import com.netflix.hystrix.HystrixCommandGroupKey;
-import com.netflix.hystrix.HystrixThreadPoolProperties;
-
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import rx.functions.Action1;
- import java.util.ArrayList;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
++import java.util.*;
+
/**
* This phase execute all unique value verification on the MvccEntity.
@@@ -163,6 -119,28 +161,29 @@@ public class WriteUniqueVerify implemen
// use write-first then read strategy
final UniqueValue written = new UniqueValueImpl( field, mvccEntity.getId(), mvccEntity.getVersion() );
+ try {
+
+ // loading will retrieve the oldest unique value entry for the field
- UniqueValueSet set = uniqueValueStrat.load(scope, written.getEntityId().getType(), Collections.singletonList(written.getField()));
++ UniqueValueSet set = uniqueValueStrat.load(
++ scope, written.getEntityId().getType(), Collections.singletonList(written.getField()));
+
+
+ set.forEach(uniqueValue -> {
+
+ if(!uniqueValue.getEntityId().getUuid().equals(written.getEntityId().getUuid())){
+
+ preWriteUniquenessViolations.put(field.getName(), field);
+
+ }
+
+ });
+
+
+ } catch (ConnectionException e) {
+
+ throw new RuntimeException("Error connecting to cassandra", e);
+ }
+
// use TTL in case something goes wrong before entity is finally committed
final MutationBatch mb = uniqueValueStrat.write( scope, written, serializationFig.getTimeout() );
@@@ -226,7 -207,7 +252,8 @@@
@Override
protected Map<String, Field> getFallback() {
-- // fallback with same CL as there are many reasons the 1st execution failed, not just due to consistency problems
++ // fallback with same CL as there are many reasons the 1st execution failed,
++ // not just due to consistency problems
return executeStrategy(fig.getReadCL());
}
@@@ -257,6 -239,16 +285,16 @@@
final Id returnedEntityId = uniqueValue.getEntityId();
if ( !entity.getId().equals(returnedEntityId) ) {
+
+ if(logger.isTraceEnabled()) {
- logger.trace("Violation occurred when verifying unique value [{}={}]. Returned entity id [{}] " +
- "does not match expected entity id [{}]",
++ logger.trace("Violation occurred when verifying unique value [{}={}]. " +
++ "Returned entity id [{}] does not match expected entity id [{}]",
+ field.getName(), field.getValue().toString(),
+ returnedEntityId,
+ entity.getId()
+ );
+ }
+
uniquenessViolations.put( field.getName(), field );
}
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/25303e6d/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
----------------------------------------------------------------------
diff --cc stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
index bb2377a,0f3daa4..f8322c6
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
@@@ -29,8 -34,6 +29,7 @@@ import org.apache.usergrid.persistence.
import org.apache.usergrid.persistence.collection.serialization.SerializationFig;
import org.apache.usergrid.persistence.collection.serialization.UniqueValueSerializationStrategy;
import org.apache.usergrid.persistence.collection.serialization.UniqueValueSet;
- import org.apache.usergrid.persistence.collection.uniquevalues.UniqueValueActor;
+import org.apache.usergrid.persistence.collection.uniquevalues.UniqueValuesService;
import org.apache.usergrid.persistence.collection.util.EntityHelper;
import org.apache.usergrid.persistence.core.guice.MigrationManagerRule;
import org.apache.usergrid.persistence.core.guicyfig.SetConfigTestBypass;
@@@ -46,19 -49,20 +45,18 @@@ import org.apache.usergrid.persistence.
import org.apache.usergrid.persistence.model.field.Field;
import org.apache.usergrid.persistence.model.field.IntegerField;
import org.apache.usergrid.persistence.model.field.StringField;
-
-import com.fasterxml.uuid.UUIDComparator;
-import com.google.inject.Inject;
-import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
-
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
import rx.Observable;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.UUID;
- import java.util.concurrent.atomic.AtomicBoolean;
+
+import static org.junit.Assert.*;
/** @author tnine */
http://git-wip-us.apache.org/repos/asf/usergrid/blob/25303e6d/stack/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/25303e6d/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/25303e6d/stack/services/src/main/java/org/apache/usergrid/services/AbstractConnectionsService.java
----------------------------------------------------------------------
[04/38] usergrid git commit: USERGRID-1300: localhost superuser
setting
Posted by sn...@apache.org.
USERGRID-1300: localhost superuser setting
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/7ea48c27
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/7ea48c27
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/7ea48c27
Branch: refs/heads/usergrid-1268-akka-211
Commit: 7ea48c27885da00a9a1d2251702e02bfe8ddf1ef
Parents: 3df0779
Author: Mike Dunker <md...@apigee.com>
Authored: Tue Jun 14 15:16:39 2016 -0700
Committer: Mike Dunker <md...@apigee.com>
Committed: Tue Jun 14 15:16:39 2016 -0700
----------------------------------------------------------------------
.../main/resources/usergrid-default.properties | 4 +++
.../rest/management/ManagementResource.java | 4 +--
.../shiro/filters/BasicAuthSecurityFilter.java | 19 ++++++++++--
.../management/AccountCreationProps.java | 3 +-
.../usergrid/management/ManagementService.java | 6 +++-
.../cassandra/AccountCreationPropsImpl.java | 17 +++++++++--
.../cassandra/ManagementServiceImpl.java | 32 ++++++++++++++++----
.../apache/usergrid/security/shiro/Realm.java | 6 ----
.../shiro/principals/AdminUserPrincipal.java | 4 +--
.../usergrid/management/OrganizationIT.java | 2 +-
.../cassandra/ManagementServiceIT.java | 6 ++--
11 files changed, 77 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7ea48c27/stack/config/src/main/resources/usergrid-default.properties
----------------------------------------------------------------------
diff --git a/stack/config/src/main/resources/usergrid-default.properties b/stack/config/src/main/resources/usergrid-default.properties
index 0fc31ef..d2141cf 100644
--- a/stack/config/src/main/resources/usergrid-default.properties
+++ b/stack/config/src/main/resources/usergrid-default.properties
@@ -535,6 +535,10 @@ usergrid.sysadmin.login.email=super@usergrid.com
usergrid.sysadmin.login.password=test
usergrid.sysadmin.login.allowed=true
+# if usergrid.sysadmin.login.allowed=true, only allows sysadmin login if request is localhost
+# if usergrid.sysadmin.login.allowed=false, this property has no effect
+usergrid.sysadmin.localhost.only=false
+
# Set admin notification email properties
#
usergrid.sysadmin.email=
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7ea48c27/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java
index 1aa75ee..c4a921c 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java
@@ -220,7 +220,7 @@ public class ManagementResource extends AbstractContextResource {
// do checking for different grant types
if ( GrantType.PASSWORD.toString().equals( grant_type ) ) {
try {
- user = management.verifyAdminUserPasswordCredentials( username, password );
+ user = management.verifyAdminUserPasswordCredentials( username, password, ui );
if ( user != null ) {
if (logger.isTraceEnabled()) {
@@ -438,7 +438,7 @@ public class ManagementResource extends AbstractContextResource {
UserInfo user = null;
try {
- user = management.verifyAdminUserPasswordCredentials( username, password );
+ user = management.verifyAdminUserPasswordCredentials( username, password, ui );
}
catch ( Exception e1 ) {
// intentionally empty
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7ea48c27/stack/rest/src/main/java/org/apache/usergrid/rest/security/shiro/filters/BasicAuthSecurityFilter.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/security/shiro/filters/BasicAuthSecurityFilter.java b/stack/rest/src/main/java/org/apache/usergrid/rest/security/shiro/filters/BasicAuthSecurityFilter.java
index a5d7272..7d6b40c 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/security/shiro/filters/BasicAuthSecurityFilter.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/security/shiro/filters/BasicAuthSecurityFilter.java
@@ -25,6 +25,7 @@ import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.PreMatching;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.ext.Provider;
+import java.net.InetAddress;
import java.security.Principal;
import java.util.Map;
@@ -65,11 +66,25 @@ public class BasicAuthSecurityFilter extends SecurityFilter {
String sysadmin_login_password = properties.getProperty( "usergrid.sysadmin.login.password" );
boolean sysadmin_login_allowed =
Boolean.parseBoolean( properties.getProperty( "usergrid.sysadmin.login.allowed" ) );
- if ( name.equals( sysadmin_login_name ) && password.equals( sysadmin_login_password )
- && sysadmin_login_allowed ) {
+ boolean sysadmin_localhost_only =
+ Boolean.parseBoolean( properties.getProperty( "usergrid.sysadmin.localhost.only", "false" ) );
+
+ boolean is_localhost = false;
+ try {
+ is_localhost = InetAddress.getByName(request.getUriInfo().getBaseUri().getHost()).isLoopbackAddress();
+ }
+ catch (Exception e) {
+ // won't treat as localhost
+ }
+ boolean password_match = password.equals( sysadmin_login_password );
+ if ( name.equals( sysadmin_login_name ) && (password_match || is_localhost)
+ && sysadmin_login_allowed && (is_localhost || !sysadmin_localhost_only)) {
request.setSecurityContext( new SysAdminRoleAuthenticator() );
if (logger.isTraceEnabled()) {
logger.trace("System administrator access allowed");
+ if (!password_match) {
+ logger.trace("Allowed sysadmin password mismatch because accessing via localhost");
+ }
}
}
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7ea48c27/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java b/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java
index 17f2c6a..a5a0751 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java
@@ -75,6 +75,7 @@ public interface AccountCreationProps {
String PROPERTIES_SYSADMIN_LOGIN_EMAIL = "usergrid.sysadmin.login.email";
String PROPERTIES_SYSADMIN_LOGIN_NAME = "usergrid.sysadmin.login.name";
String PROPERTIES_SYSADMIN_LOGIN_ALLOWED = "usergrid.sysadmin.login.allowed";
+ String PROPERTIES_SYSADMIN_LOCALHOST_ONLY = "usergrid.sysadmin.localhost.only";
String PROPERTIES_ADMIN_SYSADMIN_EMAIL = "usergrid.admin.sysadmin.email";
String PROPERTIES_ORG_SYSADMIN_EMAIL = "usergrid.org.sysadmin.email";
@@ -127,7 +128,7 @@ public interface AccountCreationProps {
SuperUser getSuperUser();
interface SuperUser{
- boolean isEnabled();
+ boolean isEnabled(String host);
String getUsername();
String getEmail();
String getPassword();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7ea48c27/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java b/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java
index 1d74ec3..481f272 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java
@@ -39,6 +39,8 @@ import org.apache.usergrid.services.ServiceResults;
import com.google.common.collect.BiMap;
import rx.Observable;
+import javax.ws.rs.core.UriInfo;
+
public interface ManagementService {
@@ -268,7 +270,9 @@ public interface ManagementService {
boolean verifyAdminUserPassword( UUID userId, String password ) throws Exception;
- UserInfo verifyAdminUserPasswordCredentials( String name, String password ) throws Exception;
+ UserInfo verifyAdminUserPasswordCredentialsOnly( String name, String password ) throws Exception;
+
+ UserInfo verifyAdminUserPasswordCredentials( String name, String password, UriInfo uriInfo ) throws Exception;
UserInfo verifyMongoCredentials( String name, String nonce, String key ) throws Exception;
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7ea48c27/stack/services/src/main/java/org/apache/usergrid/management/cassandra/AccountCreationPropsImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/AccountCreationPropsImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/AccountCreationPropsImpl.java
index 7c6a091..4077ef9 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/AccountCreationPropsImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/AccountCreationPropsImpl.java
@@ -17,9 +17,11 @@
package org.apache.usergrid.management.cassandra;
+import java.net.InetAddress;
import java.util.Enumeration;
import java.util.Properties;
+import com.amazonaws.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.usergrid.management.AccountCreationProps;
@@ -131,17 +133,28 @@ public class AccountCreationPropsImpl implements AccountCreationProps {
private final String username;
private final String email;
private final String password;
+ private final boolean localhostOnly;
public SuperUserImpl(Properties properties) {
enabled = parseBoolean(properties.getProperty(PROPERTIES_SYSADMIN_LOGIN_ALLOWED));
username = properties.getProperty(PROPERTIES_SYSADMIN_LOGIN_NAME);
email = properties.getProperty(PROPERTIES_SYSADMIN_LOGIN_EMAIL);
password = properties.getProperty(PROPERTIES_SYSADMIN_LOGIN_PASSWORD);
+ localhostOnly = parseBoolean(properties.getProperty(PROPERTIES_SYSADMIN_LOCALHOST_ONLY, "false"));
}
@Override
- public boolean isEnabled() {
- return superuserEnabled();
+ public boolean isEnabled(String host) {
+ boolean isLocalhost = false;
+ // if host not passed in, assume not localhost
+ if (!StringUtils.isNullOrEmpty(host)) {
+ try {
+ isLocalhost = InetAddress.getByName(host).isLoopbackAddress();
+ } catch (Exception e) {
+ // will treat as non-localhost
+ }
+ }
+ return superuserEnabled() && (isLocalhost || !localhostOnly);
}
@Override
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7ea48c27/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
index 73a56c8..bf20c6d 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
@@ -27,6 +27,7 @@ import com.google.inject.Injector;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang.text.StrSubstitutor;
import org.apache.shiro.UnavailableSecurityManagerException;
+import org.apache.shiro.authc.ExcessiveAttemptsException;
import org.apache.usergrid.corepersistence.service.AggregationService;
import org.apache.usergrid.corepersistence.service.AggregationServiceFactory;
import org.apache.usergrid.corepersistence.service.ApplicationService;
@@ -76,6 +77,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import rx.Observable;
+import javax.ws.rs.core.UriInfo;
import java.nio.ByteBuffer;
import java.util.*;
import java.util.Map.Entry;
@@ -357,13 +359,13 @@ public class ManagementServiceImpl implements ManagementService {
logger.warn( "Test app creation disabled" );
}
- if ( superuserEnabled() ) {
+ if ( superuserShouldBeProvisioned() ) {
provisionSuperuser();
}
}
- public boolean superuserEnabled() {
+ public boolean superuserShouldBeProvisioned() {
boolean superuser_enabled = getBooleanProperty( PROPERTIES_SYSADMIN_LOGIN_ALLOWED );
String superuser_username = properties.getProperty( PROPERTIES_SYSADMIN_LOGIN_NAME );
String superuser_email = properties.getProperty( PROPERTIES_SYSADMIN_LOGIN_EMAIL );
@@ -1347,10 +1349,27 @@ public class ManagementServiceImpl implements ManagementService {
@Override
- public UserInfo verifyAdminUserPasswordCredentials( String name, String password ) throws Exception {
+ public UserInfo verifyAdminUserPasswordCredentials( String name, String password, UriInfo uriInfo ) throws Exception {
+ // uriInfo should not be null
+ Preconditions.checkArgument(uriInfo != null, "uriInfo parameter should not be null");
+
+ return verifyAdminUserPasswordCredentialsInternal(name, password, uriInfo);
+ }
+
+
+ @Override
+ public UserInfo verifyAdminUserPasswordCredentialsOnly( String name, String password ) throws Exception {
+ return verifyAdminUserPasswordCredentialsInternal(name, password, null);
+ }
+
+
+ private UserInfo verifyAdminUserPasswordCredentialsInternal( String name, String password, UriInfo uriInfo)
+ throws Exception {
+
+ // null UriInfo means assume not a localhost request
if(logger.isTraceEnabled()){
- logger.trace("verifyAdminUserPasswordCredentials for {}", name);
+ logger.trace("verifyAdminUserPasswordCredentialsInternal for {}", name);
}
User user = findUserEntity( smf.getManagementAppId(), name );
@@ -1361,7 +1380,8 @@ public class ManagementServiceImpl implements ManagementService {
if ( verify( smf.getManagementAppId(), user.getUuid(), password ) ) {
UserInfo userInfo = getUserInfo( smf.getManagementAppId(), user );
- boolean userIsSuperAdmin = properties.getSuperUser().isEnabled()
+ boolean userIsSuperAdmin =
+ properties.getSuperUser().isEnabled(uriInfo != null ? uriInfo.getBaseUri().getHost() : null)
&& properties.getSuperUser().getEmail().equals(userInfo.getEmail());
boolean testUserEnabled = parseBoolean( properties.getProperty( PROPERTIES_SETUP_TEST_ACCOUNT ) );
@@ -1634,7 +1654,7 @@ public class ManagementServiceImpl implements ManagementService {
Map<UUID, String> organizations;
AccountCreationProps.SuperUser superUser = properties.getSuperUser();
- if ( superUser.isEnabled() && superUser.getUsername().equals( user.getUsername() ) ) {
+ if ( superUser.isEnabled(null) && superUser.getUsername().equals( user.getUsername() ) ) {
int maxOrganizations = this.getAccountCreationProps().getMaxOrganizationsForSuperUserLogin();
organizations = buildOrgBiMap( getOrganizations( null, maxOrganizations ) );
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7ea48c27/stack/services/src/main/java/org/apache/usergrid/security/shiro/Realm.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/security/shiro/Realm.java b/stack/services/src/main/java/org/apache/usergrid/security/shiro/Realm.java
index 4381f01..c8ca812 100644
--- a/stack/services/src/main/java/org/apache/usergrid/security/shiro/Realm.java
+++ b/stack/services/src/main/java/org/apache/usergrid/security/shiro/Realm.java
@@ -56,12 +56,6 @@ public class Realm extends AuthorizingRealm {
private TokenService tokens;
- @Value( "${" + PROPERTIES_SYSADMIN_LOGIN_ALLOWED + "}" )
- private boolean superUserEnabled;
- @Value( "${" + AccountCreationProps.PROPERTIES_SYSADMIN_LOGIN_NAME + ":admin}" )
- private String superUser;
-
-
public Realm() {
setCredentialsMatcher(new AllowAllCredentialsMatcher());
setPermissionResolver(new CustomPermissionResolver());
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7ea48c27/stack/services/src/main/java/org/apache/usergrid/security/shiro/principals/AdminUserPrincipal.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/security/shiro/principals/AdminUserPrincipal.java b/stack/services/src/main/java/org/apache/usergrid/security/shiro/principals/AdminUserPrincipal.java
index a594d1e..fd4f0c5 100644
--- a/stack/services/src/main/java/org/apache/usergrid/security/shiro/principals/AdminUserPrincipal.java
+++ b/stack/services/src/main/java/org/apache/usergrid/security/shiro/principals/AdminUserPrincipal.java
@@ -66,9 +66,9 @@ public class AdminUserPrincipal extends UserPrincipal {
ApplicationInfo application = null;
boolean superUserEnabled = false;
- final String s = management.getProperties().getProperty(
+ final String sysadminLoginAllowedProp = management.getProperties().getProperty(
AccountCreationProps.PROPERTIES_SYSADMIN_LOGIN_ALLOWED);
- if ( s != null && "true".equalsIgnoreCase(s.trim())) {
+ if ( sysadminLoginAllowedProp != null && "true".equalsIgnoreCase(sysadminLoginAllowedProp.trim())) {
superUserEnabled = true;
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7ea48c27/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java b/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
index 9d20dcb..44599a6 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
@@ -103,7 +103,7 @@ public class OrganizationIT {
setup.getEntityIndex().refresh(CpNamingUtils.MANAGEMENT_APPLICATION_ID);
- UserInfo u = setup.getMgmtSvc().verifyAdminUserPasswordCredentials(
+ UserInfo u = setup.getMgmtSvc().verifyAdminUserPasswordCredentialsOnly(
organization.getOwner().getUuid().toString(), "test" );
assertNotNull( u );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7ea48c27/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
index 6179a6d..83ceae9 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
@@ -480,15 +480,15 @@ public class ManagementServiceIT {
EntityManager em = setup.getEmf().getEntityManager( setup.getSmf().getManagementAppId() );
setup.getEntityIndex().refresh(applicationId);
- UserInfo authedUser = setup.getMgmtSvc().verifyAdminUserPasswordCredentials( username, password );
+ UserInfo authedUser = setup.getMgmtSvc().verifyAdminUserPasswordCredentialsOnly( username, password );
assertEquals( adminUser.getUuid(), authedUser.getUuid() );
- authedUser = setup.getMgmtSvc().verifyAdminUserPasswordCredentials( adminUser.getEmail(), password );
+ authedUser = setup.getMgmtSvc().verifyAdminUserPasswordCredentialsOnly( adminUser.getEmail(), password );
assertEquals( adminUser.getUuid(), authedUser.getUuid() );
- authedUser = setup.getMgmtSvc().verifyAdminUserPasswordCredentials( adminUser.getUuid().toString(), password );
+ authedUser = setup.getMgmtSvc().verifyAdminUserPasswordCredentialsOnly( adminUser.getUuid().toString(), password );
assertEquals( adminUser.getUuid(), authedUser.getUuid() );
}
[14/38] usergrid git commit: Add additional logging and rx error
handling.
Posted by sn...@apache.org.
Add additional logging and rx error handling.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/9efa3b4c
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/9efa3b4c
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/9efa3b4c
Branch: refs/heads/usergrid-1268-akka-211
Commit: 9efa3b4c6ce490d39361582c820aa43975c4ebc2
Parents: f4599fb
Author: Michael Russo <mr...@apigee.com>
Authored: Mon Jun 20 12:59:15 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Mon Jun 20 12:59:15 2016 -0700
----------------------------------------------------------------------
.../usergrid/corepersistence/CpEntityManager.java | 17 +++++++++++++----
.../impl/EntityCollectionManagerImpl.java | 14 ++++++++++++++
2 files changed, 27 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/9efa3b4c/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
index a2813ef..82c4c87 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
@@ -878,11 +878,15 @@ public class CpEntityManager implements EntityManager {
return null;
}
- FieldSet fieldSet = fieldSetObservable.toBlocking().last();
+ FieldSet fieldSet = fieldSetObservable
+ .doOnError( t ->
+ logger.error("Unable to retrieve unique values due to: {}", t.getMessage())
+ )
+ .toBlocking().last();
repairedEntityGet.stop();
- if(fieldSet.isEmpty()) {
+ if(fieldSet == null || fieldSet.isEmpty()) {
return null;
}
@@ -908,8 +912,13 @@ public class CpEntityManager implements EntityManager {
return null;
}
- FieldSet fieldSet = fieldSetObservable.toBlocking().last();
- if(fieldSet.isEmpty()) {
+ FieldSet fieldSet = fieldSetObservable
+ .doOnError( t ->
+ logger.error("Unable to retrieve unique values due to: {}", t.getMessage())
+ )
+ .toBlocking().last();
+
+ if(fieldSet == null || fieldSet.isEmpty()) {
return null;
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/9efa3b4c/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
index cc72e73..77e452f 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
@@ -338,6 +338,20 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
//Short circuit if we don't have any uniqueValues from the given fields.
if ( !set.iterator().hasNext() ) {
+
+ fields1.forEach( field -> {
+
+ if(logger.isTraceEnabled()){
+ logger.trace("Requested field [{}={}] not found in unique value table",
+ field.getName(), field.getValue().toString());
+ }
+
+ });
+
+ if(logger.isTraceEnabled()) {
+ logger.trace("No unique values found for requested fields, returning empty FieldSet");
+ }
+
return new MutableFieldSet( 0 );
}
[22/38] usergrid git commit: Fix log statement to use .trace()
Posted by sn...@apache.org.
Fix log statement to use .trace()
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/b6b01324
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/b6b01324
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/b6b01324
Branch: refs/heads/usergrid-1268-akka-211
Commit: b6b013240a3838ce0aa786ece3c20b916bc7af01
Parents: e24ea20
Author: Michael Russo <mr...@apigee.com>
Authored: Wed Jun 22 23:04:58 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Wed Jun 22 23:04:58 2016 -0700
----------------------------------------------------------------------
.../serialization/impl/UniqueValueSerializationStrategyImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/b6b01324/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
index 8a41bff..bf7d2fc 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
@@ -349,7 +349,7 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
candidates.clear();
if(logger.isTraceEnabled()) {
- logger.info("Updating candidate to entity id [{}] and entity version [{}]",
+ logger.trace("Updating candidate to entity id [{}] and entity version [{}]",
uniqueValue.getEntityId().getUuid(), uniqueValue.getEntityVersion());
}
[24/38] usergrid git commit: Fix log statement. Only newer duplicate
unique value entries are removed ( it just might be the candidate or current
one in the loop).
Posted by sn...@apache.org.
Fix log statement. Only newer duplicate unique value entries are removed ( it just might be the candidate or current one in the loop).
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/cf4c7f89
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/cf4c7f89
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/cf4c7f89
Branch: refs/heads/usergrid-1268-akka-211
Commit: cf4c7f898d73b1a864ba541156cd1e5315b5c1d7
Parents: 20ae382
Author: Michael Russo <mr...@apigee.com>
Authored: Thu Jun 23 12:39:31 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Thu Jun 23 12:39:31 2016 -0700
----------------------------------------------------------------------
.../serialization/impl/UniqueValueSerializationStrategyImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/cf4c7f89/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
index bf7d2fc..1c5b08f 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
@@ -333,7 +333,7 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
try {
- logger.warn("Duplicate unique value [{}={}] found, removing older entry " +
+ logger.warn("Duplicate unique value [{}={}] found, removing newer entry " +
"with entity id [{}] and entity version [{}]", field.getName(), field.getValue().toString(),
candidate.getEntityId().getUuid(), candidate.getEntityVersion() );
[23/38] usergrid git commit: Add additional logging around batch
entity creation.
Posted by sn...@apache.org.
Add additional logging around batch entity creation.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/20ae3824
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/20ae3824
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/20ae3824
Branch: refs/heads/usergrid-1268-akka-211
Commit: 20ae3824b67f291b9b4dd065bf83c8eefc3bb408
Parents: b6b0132
Author: Michael Russo <mr...@apigee.com>
Authored: Thu Jun 23 11:25:00 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Thu Jun 23 11:25:00 2016 -0700
----------------------------------------------------------------------
.../graph/impl/GraphManagerImpl.java | 4 ++
.../services/AbstractCollectionService.java | 41 ++++++++++++--------
2 files changed, 28 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/20ae3824/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java
index e8761f8..5fcdcb4 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/impl/GraphManagerImpl.java
@@ -483,6 +483,10 @@ public class GraphManagerImpl implements GraphManager {
return true;
}
+ if(logger.isTraceEnabled()){
+ logger.trace("Filtering edge {}", simpleMarkedEdge);
+ }
+
//if any one of these is true, we filter it
return !simpleMarkedEdge.isDeleted() && !simpleMarkedEdge.isSourceNodeDelete() && !simpleMarkedEdge.isTargetNodeDeleted();
});
http://git-wip-us.apache.org/repos/asf/usergrid/blob/20ae3824/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java b/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
index 7b9e230..cbea659 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
@@ -17,11 +17,7 @@
package org.apache.usergrid.services;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
+import java.util.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -389,37 +385,48 @@ public class AbstractCollectionService extends AbstractService {
batch.size(), context.getCollectionName());
}
- int i = 1;
+
+ final Map<String, Boolean> nameValues = new HashMap<>(batch.size());
for ( Map<String, Object> p : batch ) {
+
+ // track unique name value in the batch to identify if duplicates are trying to be created
+ String name = p.get("name").toString();
+ if( name !=null && nameValues.get(name) !=null ){
+ logger.warn("Batch contains more than 1 entity with the same name: {}", name);
+ }else{
+ nameValues.put(name, true);
+ }
+
+
if (logger.isTraceEnabled()) {
- logger.trace("Creating entity {} in collection {}", i, context.getCollectionName());
+ logger.trace("Creating entity [{}] in collection [{}]", p, context.getCollectionName());
}
- Entity item = null;
+ Entity item = null;
try {
item = em.createItemInCollection( context.getOwner(), context.getCollectionName(), getEntityType(),
p );
}
catch ( Exception e ) {
- // TODO should we not log this as error?
- if (logger.isDebugEnabled()) {
- logger.debug("Entity {} unable to be created in collection {}", i, context.getCollectionName(),
- e);
- }
- i++;
+ logger.error("Entity [{}] unable to be created in collection [{}] due to [{} - {}]", p, context.getCollectionName(),
+ e.getClass().getSimpleName(), e.getMessage());
+
+ // move on as we can't block the whole batch if only 1 failed
continue;
}
+
+
if (logger.isTraceEnabled()) {
- logger.trace(
- "Entity {} created in collection {} with UUID {}", i, context.getCollectionName(), item.getUuid());
+ logger.trace("Successfully created entity [{}] in collection [{}]", p, context.getCollectionName());
}
+
item = importEntity( context, item );
entities.add( item );
- i++;
+
}
return new ServiceResults( this, context, Type.COLLECTION, Results.fromEntities( entities ), null, null );
}
[31/38] usergrid git commit: Add application id to log for duplicate
unique values.
Posted by sn...@apache.org.
Add application id to log for duplicate unique values.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/0c965ae2
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/0c965ae2
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/0c965ae2
Branch: refs/heads/usergrid-1268-akka-211
Commit: 0c965ae221f9761f30e5c3fc5562b8e455a347bf
Parents: e982ba4
Author: Mike Dunker <md...@apigee.com>
Authored: Mon Jun 27 09:28:26 2016 -0700
Committer: Mike Dunker <md...@apigee.com>
Committed: Mon Jun 27 09:28:26 2016 -0700
----------------------------------------------------------------------
.../impl/UniqueValueSerializationStrategyImpl.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0c965ae2/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
index 1c5b08f..28e28aa 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
@@ -333,8 +333,9 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
try {
- logger.warn("Duplicate unique value [{}={}] found, removing newer entry " +
- "with entity id [{}] and entity version [{}]", field.getName(), field.getValue().toString(),
+ logger.warn("Duplicate unique value [{}={}] found for application [{}], removing newer " +
+ "entry with entity id [{}] and entity version [{}]", field.getName(),
+ field.getValue().toString(), applicationId.getUuid(),
candidate.getEntityId().getUuid(), candidate.getEntityVersion() );
delete(appScope, candidate ).execute();
[19/38] usergrid git commit: Reset unique value test to its original
state.
Posted by sn...@apache.org.
Reset unique value test to its original state.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/5c81a020
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/5c81a020
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/5c81a020
Branch: refs/heads/usergrid-1268-akka-211
Commit: 5c81a0207f873f6ca54b40043143e87f65c2ced2
Parents: 75d2254
Author: Michael Russo <mr...@apigee.com>
Authored: Wed Jun 22 16:45:01 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Wed Jun 22 16:45:01 2016 -0700
----------------------------------------------------------------------
.../collection/EntityCollectionManagerIT.java | 58 ++++++--------------
1 file changed, 18 insertions(+), 40 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/5c81a020/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
index f828c65..0f3daa4 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
@@ -117,49 +117,27 @@ public class EntityCollectionManagerIT {
EntityCollectionManager manager = factory.createCollectionManager( context );
- Entity entity = new Entity( new SimpleId( "test" ) );
- entity.setField( new IntegerField( "count", 5, true ) );
-
- Observable<Entity> firstWrite = manager.write( entity );
-
- Entity newEntity = null;
- Entity firstReturned = null;
-
- for(int i=0; i<500; i++){
-
-
- firstReturned = firstWrite.toBlocking().lastOrDefault( null );
+ {
+ Entity newEntity = new Entity( new SimpleId( "test" ) );
+ newEntity.setField( new IntegerField( "count", 5, true ) );
+ Observable<Entity> observable = manager.write( newEntity );
+ Entity returned = observable.toBlocking().lastOrDefault( null );
}
-// try {
-// //newEntity = new Entity( new SimpleId( "test" ) );
-// //newEntity.setField( new IntegerField( "count", 5, true ) );
-//
-// Observable<Entity> secondWrite = manager.write( entity );
-// secondReturned = secondWrite.toBlocking().lastOrDefault( null );
-//
-// //fail( "Write should have thrown an exception" );
-// }
-// catch ( Exception ex ) {
-// WriteUniqueVerifyException e = ( WriteUniqueVerifyException ) ex;
-// assertEquals( 1, e.getVioliations().size() );
-// }
-
- // try fetching the original one again
-
- assertEquals(entity.getId().getUuid(), firstReturned.getId().getUuid());
- assertEquals(entity.getVersion(), firstReturned.getVersion());
-
-
- //assertEquals(newEntity.getId().getUuid(), secondReturned.getId().getUuid());
- //assertEquals(newEntity.getVersion(), secondReturned.getVersion());
-
-
-
-
-
-
+ {
+ try {
+ Entity newEntity = new Entity( new SimpleId( "test" ) );
+ newEntity.setField( new IntegerField( "count", 5, true ) );
+
+ manager.write( newEntity ).toBlocking().last();
+ fail( "Write should have thrown an exception" );
+ }
+ catch ( Exception ex ) {
+ WriteUniqueVerifyException e = ( WriteUniqueVerifyException ) ex;
+ assertEquals( 1, e.getVioliations().size() );
+ }
+ }
}
[09/38] usergrid git commit: Add Pivotal Cloud Foundry source for
creating Usergrid Tile ( CF deployment + bosh release )
Posted by sn...@apache.org.
Add Pivotal Cloud Foundry source for creating Usergrid Tile ( CF deployment + bosh release )
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/29c287b2
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/29c287b2
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/29c287b2
Branch: refs/heads/usergrid-1268-akka-211
Commit: 29c287b22c030164faef4d57e2e7fa51fbaaf2f1
Parents: 8814a14
Author: Michael Russo <mr...@apigee.com>
Authored: Wed Jun 15 09:21:40 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Wed Jun 15 09:21:40 2016 -0700
----------------------------------------------------------------------
deployment/pcf/LICENSE | 201 ++++++++
deployment/pcf/README.md | 44 ++
deployment/pcf/addBlobs.sh | 25 +
deployment/pcf/apache-usergrid-tile-1.6.yml | 510 +++++++++++++++++++
deployment/pcf/config/blobs.yml | 19 +
deployment/pcf/config/final.yml | 24 +
deployment/pcf/content_migrations.yml | 53 ++
deployment/pcf/createRelease.sh | 24 +
deployment/pcf/createTile.sh | 32 ++
deployment/pcf/jobs/delete-all/monit | 17 +
deployment/pcf/jobs/delete-all/spec | 44 ++
.../jobs/delete-all/templates/delete-all.sh.erb | 131 +++++
deployment/pcf/jobs/deploy-all/monit | 18 +
deployment/pcf/jobs/deploy-all/spec | 145 ++++++
.../jobs/deploy-all/templates/deploy-all.sh.erb | 384 ++++++++++++++
.../pcf/jobs/docker-bosh-cassandra_docker/monit | 23 +
.../pcf/jobs/docker-bosh-cassandra_docker/spec | 26 +
.../docker-bosh-cassandra_docker.sh.erb | 69 +++
.../jobs/docker-bosh-elasticsearch_docker/monit | 23 +
.../jobs/docker-bosh-elasticsearch_docker/spec | 26 +
.../docker-bosh-elasticsearch_docker.sh.erb | 69 +++
.../pcf/packages/cassandra_docker/packaging | 26 +
deployment/pcf/packages/cassandra_docker/spec | 26 +
deployment/pcf/packages/cf_cli/packaging | 26 +
deployment/pcf/packages/cf_cli/spec | 25 +
deployment/pcf/packages/common/packaging | 23 +
deployment/pcf/packages/common/spec | 25 +
.../pcf/packages/elasticsearch_docker/packaging | 26 +
.../pcf/packages/elasticsearch_docker/spec | 26 +
deployment/pcf/packages/usergrid_app/packaging | 27 +
deployment/pcf/packages/usergrid_app/spec | 27 +
deployment/pcf/run.sh | 25 +
deployment/pcf/src/common/utils.sh | 107 ++++
deployment/pcf/src/templates/all_open.json | 6 +
deployment/pcf/src/usergrid_app/manifest.yml | 22 +
35 files changed, 2324 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/LICENSE
----------------------------------------------------------------------
diff --git a/deployment/pcf/LICENSE b/deployment/pcf/LICENSE
new file mode 100644
index 0000000..8dada3e
--- /dev/null
+++ b/deployment/pcf/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "{}"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright {yyyy} {name of copyright owner}
+
+ Licensed 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/usergrid/blob/29c287b2/deployment/pcf/README.md
----------------------------------------------------------------------
diff --git a/deployment/pcf/README.md b/deployment/pcf/README.md
new file mode 100644
index 0000000..0a002ed
--- /dev/null
+++ b/deployment/pcf/README.md
@@ -0,0 +1,44 @@
+# Bosh Release + PCF Tile for Apache Usergrid
+
+This is a bosh release for the apache usergrid. The scripts provided can help create the bosh release and tile for Apache Usergrid.
+A version of the tile is available here: https://s3.amazonaws.com/usergrid-v2-public/usergrid_v2.pivotal
+
+# Components Dependency
+* Apache usergrid warfile
+ Grab the code from: https://github.com/apache/usergrid
+ Build the war file and save it as ROOT.war
+* CF CLI Linux binary
+ Download the CF CLI linux binary (64 bit) from: https://github.com/cloudfoundry/cli/releases
+* ElasticSearch and Cassandra.
+ Apache Usergrid requires ElasticSearch and Cassandra to search and manage data.
+ The Bosh release uses dockerized images to run both ElasticSearch and Cassandra.
+ Create docker images for both elastic search (v1.7) and cassandra (v2.1) and save them locally as tarballs
+* Docker Bosh Release
+ To run docker images within Bosh, we need the docker bosh release.
+ Download v23 from: http://bosh.io/releases/github.com/cf-platform-eng/docker-boshrelease?all=1
+
+# Building Bosh release
+* Ensure following files are available at the root of the apache-usergrid-release directory
+```
+cf-linux-amd64.tgz # downloaded from CF cli github repo
+ROOT.war # built from usergrid repo
+cassandra-2.1.tgz # Saved Cassandra 2.1 docker image
+elasticsearch-1.7.tgz # Saved ElasticSearch 1.7 docker image
+docker-boshrelease-23.tgz # Docker Bosh release v23
+```
+* Run addBlobs.sh
+ Important to ensure the above blobs filenames match the entries inside the addBlobs.sh (& each of the packages/*/packaging file)
+* Run ./createRelease.sh
+ Edit the version as required inside the script
+# Building Tile
+* Edit the apache-usergrid-tile-1.6.yml to refer to the correct version of release tarball (for docker bosh release and usergrid)
+* Run ./createTile.sh
+ Edit the file names or versions as needed.
+ The docker-boshrelease-23.tgz file should be present in the directory to create a valid working tile
+ The script should create the usergrid.pivotal tile file.
+
+# Notes
+* Ensure the usergrid war file is named ROOT.war (or rename all references of ROOT.war with different file name) before running addBlobs.sh
+* If newer versions are being used, please check and replace the associated versions inside packages/<package-name>/spec & packages/<packagge-name>/packaging file to deal with correct files.
+* Update the tile metadata file if newer release versions are used
+* Update the content_migrations.yml if new tile version is being published
http://git-wip-us.apache.org/repos/asf/usergrid/blob/29c287b2/deployment/pcf/addBlobs.sh
----------------------------------------------------------------------
diff --git a/deployment/pcf/addBlobs.sh b/deployment/pcf/addBlobs.sh
new file mode 100755
index 0000000..35cdbca
--- /dev/null
+++ b/deployment/pcf/addBlobs.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. 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. For additional information regarding
+# copyright in this work, please see the NOTICE file in the top level
+# directory of this distribution.
+#
+
+bosh add blob ROOT.war usergrid_app
+bosh add blob cassandra-2.1.tgz cassandra_docker
+bosh add blob elasticsearch-1.7.tgz elasticsearch_docker
+bosh add blob cf-linux-amd64.tgz cf_cli
+bosh upload blobs
[18/38] usergrid git commit: Implement smarter loading of unique
value entries in hopes to avoid duplicate problems. Update UniqueValueScanner
tool to allow specific entity fetch.
Posted by sn...@apache.org.
Implement smarter loading of unique value entries in hopes to avoid duplicate problems. Update UniqueValueScanner tool to allow specific entity fetch.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/75d2254e
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/75d2254e
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/75d2254e
Branch: refs/heads/usergrid-1268-akka-211
Commit: 75d2254e3f57bdf78a965e71255910e25121fe94
Parents: 1997b57
Author: Michael Russo <mr...@apigee.com>
Authored: Wed Jun 22 16:34:28 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Wed Jun 22 16:34:28 2016 -0700
----------------------------------------------------------------------
.../mvcc/stage/write/WriteUniqueVerify.java | 34 +++++-
.../UniqueValueSerializationStrategy.java | 3 +-
.../UniqueValueSerializationStrategyImpl.java | 86 ++++++++++++----
.../collection/EntityCollectionManagerIT.java | 4 +-
...niqueValueSerializationStrategyImplTest.java | 103 ++++++++++++++++++-
.../collection/devices/DevicesResourceIT.java | 3 +-
.../usergrid/tools/UniqueValueScanner.java | 47 +++++++--
7 files changed, 245 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/75d2254e/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
index afe681e..7b76dc8 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
@@ -18,10 +18,7 @@
package org.apache.usergrid.persistence.collection.mvcc.stage.write;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import com.netflix.hystrix.HystrixCommandProperties;
import org.slf4j.Logger;
@@ -112,6 +109,7 @@ public class WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>>
// Construct all the functions for verifying we're unique
//
+ final Map<String, Field> preWriteUniquenessViolations = new HashMap<>( uniqueFields.size() );
for ( final Field field : EntityUtils.getUniqueFields(entity)) {
@@ -121,6 +119,28 @@ public class WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>>
// use write-first then read strategy
final UniqueValue written = new UniqueValueImpl( field, mvccEntity.getId(), mvccEntity.getVersion() );
+ try {
+
+ // loading will retrieve the oldest unique value entry for the field
+ UniqueValueSet set = uniqueValueStrat.load(scope, written.getEntityId().getType(), Collections.singletonList(written.getField()));
+
+
+ set.forEach(uniqueValue -> {
+
+ if(!uniqueValue.getEntityId().getUuid().equals(written.getEntityId().getUuid())){
+
+ preWriteUniquenessViolations.put(field.getName(), field);
+
+ }
+
+ });
+
+
+ } catch (ConnectionException e) {
+
+ throw new RuntimeException("Error connecting to cassandra", e);
+ }
+
// use TTL in case something goes wrong before entity is finally committed
final MutationBatch mb = uniqueValueStrat.write( scope, written, serializationFig.getTimeout() );
@@ -128,6 +148,11 @@ public class WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>>
uniqueFields.add(field);
}
+ if(preWriteUniquenessViolations.size() > 0 ){
+ throw new WriteUniqueVerifyException(mvccEntity, scope,
+ preWriteUniquenessViolations );
+ }
+
//short circuit nothing to do
if ( uniqueFields.size() == 0 ) {
return ;
@@ -191,6 +216,7 @@ public class WriteUniqueVerify implements Action1<CollectionIoEvent<MvccEntity>>
//now get the set of fields back
final UniqueValueSet uniqueValues;
try {
+ // load ascending for verification to make sure we wrote is the last read back
uniqueValues = uniqueValueSerializationStrategy.load( scope, consistencyLevel, type, uniqueFields );
}
catch ( ConnectionException e ) {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/75d2254e/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/UniqueValueSerializationStrategy.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/UniqueValueSerializationStrategy.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/UniqueValueSerializationStrategy.java
index 3645107..95cfa68 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/UniqueValueSerializationStrategy.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/UniqueValueSerializationStrategy.java
@@ -59,7 +59,8 @@ public interface UniqueValueSerializationStrategy extends Migration, VersionedDa
MutationBatch write( ApplicationScope applicationScope, UniqueValue uniqueValue, int timeToLive );
/**
- * Load UniqueValue that matches field from collection or null if that value does not exist.
+ * Load UniqueValue that matches field from collection or null if that value does not exist. Returns the oldest
+ * unique value entry if more than 1 exists
*
* @param applicationScope scope in which to look for field name/value
* @param type The type the unique value exists within
http://git-wip-us.apache.org/repos/asf/usergrid/blob/75d2254e/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
index f7d5199..a323746 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImpl.java
@@ -18,13 +18,9 @@
package org.apache.usergrid.persistence.collection.serialization.impl;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.UUID;
+import java.util.*;
+import com.netflix.astyanax.util.RangeBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -55,7 +51,6 @@ import com.netflix.astyanax.model.Column;
import com.netflix.astyanax.model.ConsistencyLevel;
import com.netflix.astyanax.model.Row;
import com.netflix.astyanax.query.RowQuery;
-import com.netflix.astyanax.util.RangeBuilder;
/**
@@ -271,7 +266,8 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
Iterator<Row<ScopedRowKey<FieldKey>, EntityVersion>> results =
keyspace.prepareQuery( CF_UNIQUE_VALUES ).setConsistencyLevel( consistencyLevel ).getKeySlice( keys )
- .withColumnRange( new RangeBuilder().setLimit( 1 ).build() ).execute().getResult().iterator();
+ .withColumnRange(new RangeBuilder().setLimit(serializationFig.getBufferSize()).build())
+ .execute().getResult().iterator();
while ( results.hasNext() )
@@ -280,7 +276,6 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
final Row<ScopedRowKey<FieldKey>, EntityVersion> unique = results.next();
-
final Field field = parseRowKey( unique.getKey() );
final Iterator<Column<EntityVersion>> columnList = unique.getColumns().iterator();
@@ -290,20 +285,75 @@ public abstract class UniqueValueSerializationStrategyImpl<FieldKey, EntityKey>
continue;
}
- final EntityVersion entityVersion = columnList.next().getName();
+ // these used duplicate tracking and cleanup
+ UUID oldestEntityUUID = null;
+ UniqueValueImpl firstUniqueValue = null;
+
+
+ /**
+ * While iterating the columns, a rule is being enforced to only EVER return the oldest UUID. This means
+ * the UUID with the oldest timestamp ( it was the original entity written for the unique value ).
+ *
+ * We do this to prevent cycling of unique value -> entity UUID mappings as this data is ordered by the
+ * entity's version and not the entity's timestamp itself.
+ *
+ * If newer entity UUIDs are encountered, they are removed from the unique value tables, however their
+ * backing serialized entity data is left in tact in case a cleanup / audit is later needed.
+ */
+ while (columnList.hasNext()) {
+
+ final EntityVersion entityVersion = columnList.next().getName();
+
+ final UUID currentEntityUUID = entityVersion.getEntityId().getUuid();
+ final UniqueValueImpl uniqueValue =
+ new UniqueValueImpl(field, entityVersion.getEntityId(), entityVersion.getEntityVersion());
+
+
+ // keep track of the first and oldest entity (not version),
+ // knowing the the first one may not be the 'oldest'
+ if(oldestEntityUUID == null){
+
+ oldestEntityUUID = currentEntityUUID;
+ firstUniqueValue = uniqueValue;
+
+ }else if(currentEntityUUID.timestamp() < oldestEntityUUID.timestamp()){
+ oldestEntityUUID = currentEntityUUID;
+ }
- final UniqueValueImpl uniqueValue =
- new UniqueValueImpl( field, entityVersion.getEntityId(), entityVersion.getEntityVersion() );
- if(logger.isTraceEnabled()){
- logger.trace("Putting unique value [{}={}] into result set with entity id [{}] and entity version [{}]",
- field.getName(), field.getValue().toString(),
- entityVersion.getEntityId(),
- entityVersion.getEntityVersion());
+ // only return the oldest (original) unique value entries
+ if(currentEntityUUID.timestamp() <= oldestEntityUUID.timestamp() ){
+
+ if (logger.isTraceEnabled()) {
+ logger.trace("Putting unique value [{}={}] into result set with entity id [{}] and entity version [{}]",
+ field.getName(), field.getValue().toString(),
+ entityVersion.getEntityId(),
+ entityVersion.getEntityVersion());
+ }
+
+ uniqueValueSet.addValue(uniqueValue);
+
+ }
+ // remove the newer duplicated unique value entries
+ else{
+
+ delete(appScope, uniqueValue ).execute();
+
+ }
+
}
- uniqueValueSet.addValue( uniqueValue );
+ // check to see if the very first unique value entry was overwritten because it was not the oldest
+ // if so, clean up its unique index
+ if( !uniqueValueSet.getValue( firstUniqueValue.getField().getName() )
+ .getEntityId().getUuid().equals(firstUniqueValue.getEntityId().getUuid()) ){
+
+ delete(appScope, firstUniqueValue).execute();
+
+ }
+
+
}
return uniqueValueSet;
http://git-wip-us.apache.org/repos/asf/usergrid/blob/75d2254e/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
index 10c7eb7..f828c65 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
@@ -758,7 +758,7 @@ public class EntityCollectionManagerIT {
assertNotNull( "Version was assigned", createReturned.getVersion() );
FieldSet fieldResults =
- manager.getEntitiesFromFields( newEntity.getId().getType(), Arrays.<Field>asList( expectedInteger ), false)
+ manager.getEntitiesFromFields( newEntity.getId().getType(), Arrays.<Field>asList( expectedInteger ), true)
.toBlocking().last();
assertEquals( 1, fieldResults.size() );
@@ -775,7 +775,7 @@ public class EntityCollectionManagerIT {
//try to load via the unique field, should have triggered repair
final FieldSet results =
- manager.getEntitiesFromFields( newEntity.getId().getType(), Arrays.<Field>asList( expectedInteger ), false)
+ manager.getEntitiesFromFields( newEntity.getId().getType(), Arrays.<Field>asList( expectedInteger ), true)
.toBlocking().last();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/75d2254e/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java
index fcf22cf..6c4e72b 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java
@@ -33,7 +33,6 @@ import org.apache.usergrid.persistence.collection.guice.TestCollectionModule;
import org.apache.usergrid.persistence.collection.serialization.UniqueValue;
import org.apache.usergrid.persistence.collection.serialization.UniqueValueSerializationStrategy;
import org.apache.usergrid.persistence.collection.serialization.UniqueValueSet;
-import org.apache.usergrid.persistence.collection.serialization.impl.UniqueValueImpl;
import org.apache.usergrid.persistence.core.guice.MigrationManagerRule;
import org.apache.usergrid.persistence.core.scope.ApplicationScope;
import org.apache.usergrid.persistence.core.scope.ApplicationScopeImpl;
@@ -341,4 +340,106 @@ public abstract class UniqueValueSerializationStrategyImplTest {
}
+ /**
+ * Test that inserting duplicates always show the oldest entity UUID being returned (versions of that OK to change).
+ *
+ * @throws ConnectionException
+ * @throws InterruptedException
+ */
+ @Test
+ public void testWritingDuplicates() throws ConnectionException, InterruptedException {
+
+ ApplicationScope scope =
+ new ApplicationScopeImpl( new SimpleId( "organization" ) );
+
+ IntegerField field = new IntegerField( "count", 5 );
+ Id entityId1 = new SimpleId( UUIDGenerator.newTimeUUID(), "entity" );
+ Id entityId2 = new SimpleId( UUIDGenerator.newTimeUUID(), "entity" );
+
+
+
+ UUID version1 = UUIDGenerator.newTimeUUID();
+ UUID version2 = UUIDGenerator.newTimeUUID();
+
+ UniqueValue stored1 = new UniqueValueImpl( field, entityId1, version2 );
+ UniqueValue stored2 = new UniqueValueImpl( field, entityId2, version1 );
+
+
+ strategy.write( scope, stored1 ).execute();
+ strategy.write( scope, stored2 ).execute();
+
+ // load descending to get the older version of entity for this unique value
+ UniqueValueSet fields = strategy.load( scope, entityId1.getType(), Collections.<Field>singleton( field ));
+
+ UniqueValue retrieved = fields.getValue( field.getName() );
+
+ // validate that the first entity UUID is returned after inserting a duplicate mapping
+ assertEquals( stored1, retrieved );
+
+
+
+ UUID version3 = UUIDGenerator.newTimeUUID();
+ UniqueValue stored3 = new UniqueValueImpl( field, entityId2, version3);
+ strategy.write( scope, stored3 ).execute();
+
+ // load the values again, we should still only get back the original unique value
+ fields = strategy.load( scope, entityId1.getType(), Collections.<Field>singleton( field ));
+
+ retrieved = fields.getValue( field.getName() );
+
+ // validate that the first entity UUID is still returned after inserting duplicate with newer version
+ assertEquals( stored1, retrieved );
+
+
+ UUID version4 = UUIDGenerator.newTimeUUID();
+ UniqueValue stored4 = new UniqueValueImpl( field, entityId1, version4);
+ strategy.write( scope, stored4 ).execute();
+
+ // load the values again, now we should get the latest version of the original UUID written
+ fields = strategy.load( scope, entityId1.getType(), Collections.<Field>singleton( field ));
+
+ retrieved = fields.getValue( field.getName() );
+
+ // validate that the first entity UUID is still returned, but with the latest version
+ assertEquals( stored4, retrieved );
+
+ }
+
+ /**
+ * Test that inserting multiple versions of the same entity UUID result in the latest version being returned.
+ *
+ * @throws ConnectionException
+ * @throws InterruptedException
+ */
+ @Test
+ public void testMultipleVersionsSameEntity() throws ConnectionException, InterruptedException {
+
+ ApplicationScope scope =
+ new ApplicationScopeImpl( new SimpleId( "organization" ) );
+
+ IntegerField field = new IntegerField( "count", 5 );
+ Id entityId1 = new SimpleId( UUIDGenerator.newTimeUUID(), "entity" );
+
+
+
+ UUID version1 = UUIDGenerator.newTimeUUID();
+ UUID version2 = UUIDGenerator.newTimeUUID();
+
+ UniqueValue stored1 = new UniqueValueImpl( field, entityId1, version1 );
+ UniqueValue stored2 = new UniqueValueImpl( field, entityId1, version2 );
+
+
+ strategy.write( scope, stored1 ).execute();
+ strategy.write( scope, stored2 ).execute();
+
+ // load descending to get the older version of entity for this unique value
+ UniqueValueSet fields = strategy.load( scope, entityId1.getType(), Collections.<Field>singleton( field ));
+
+ UniqueValue retrieved = fields.getValue( field.getName() );
+ Assert.assertNotNull( retrieved );
+ assertEquals( stored2, retrieved );
+
+
+ }
+
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/75d2254e/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/devices/DevicesResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/devices/DevicesResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/devices/DevicesResourceIT.java
index 02716a7..67cf19f 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/devices/DevicesResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/devices/DevicesResourceIT.java
@@ -22,6 +22,7 @@ import java.util.Map;
import java.util.UUID;
import com.fasterxml.jackson.databind.JsonNode;
+import org.apache.usergrid.persistence.model.util.UUIDGenerator;
import org.apache.usergrid.rest.test.resource.AbstractRestIT;
import org.apache.usergrid.rest.test.resource.endpoints.CollectionEndpoint;
import org.apache.usergrid.rest.test.resource.model.ApiResponse;
@@ -45,7 +46,7 @@ public class DevicesResourceIT extends AbstractRestIT {
public void putWithUUIDShouldCreateAfterDelete() throws IOException {
Entity payload = new Entity().chainPut("name", "foo");
- UUID uuid = UUID.randomUUID();
+ UUID uuid = UUIDGenerator.newTimeUUID();
CollectionEndpoint devicesResource =this.app().collection("devices");
http://git-wip-us.apache.org/repos/asf/usergrid/blob/75d2254e/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueValueScanner.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueValueScanner.java b/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueValueScanner.java
index f884a1d..bdebd01 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueValueScanner.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueValueScanner.java
@@ -21,13 +21,11 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.UUID;
-import com.google.common.base.Optional;
import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
import com.netflix.astyanax.model.Column;
import com.netflix.astyanax.util.RangeBuilder;
import org.apache.usergrid.persistence.Entity;
import org.apache.usergrid.persistence.EntityManager;
-import org.apache.usergrid.persistence.collection.MvccEntity;
import org.apache.usergrid.persistence.collection.serialization.MvccEntitySerializationStrategy;
import org.apache.usergrid.persistence.collection.serialization.UniqueValueSerializationStrategy;
import org.apache.usergrid.persistence.collection.serialization.UniqueValueSet;
@@ -60,6 +58,9 @@ public class UniqueValueScanner extends ToolBase {
private static final String ENTITY_NAME_ARG = "entityName";
+ private static final String ENTITY_FIELD_TYPE_ARG = "fieldType";
+
+
//copied shamelessly from unique value serialization strat.
private static final ScopedRowKeySerializer<TypeField> ROW_KEY_SER =
@@ -100,11 +101,16 @@ public class UniqueValueScanner extends ToolBase {
options.addOption( collectionOption );
Option specificEntityNameOption =
- OptionBuilder.withArgName(ENTITY_NAME_ARG).hasArg().isRequired( true ).withDescription( "specific entity name" )
+ OptionBuilder.withArgName(ENTITY_NAME_ARG).hasArg().isRequired( false ).withDescription( "specific entity name" )
.create(ENTITY_NAME_ARG);
options.addOption( specificEntityNameOption );
+ Option fieldTypeOption =
+ OptionBuilder.withArgName(ENTITY_FIELD_TYPE_ARG).hasArg().isRequired( false ).withDescription( "field type" )
+ .create(ENTITY_FIELD_TYPE_ARG);
+
+ options.addOption( fieldTypeOption );
return options;
}
@@ -126,14 +132,15 @@ public class UniqueValueScanner extends ToolBase {
appToFilter = UUID.fromString(line.getOptionValue(APPLICATION_ARG));
}
+ logger.info("Staring Tool: UniqueValueScanner");
- logger.info("Starting entity unique scanner");
keyspace = injector.getInstance(com.netflix.astyanax.Keyspace.class);
mvccEntitySerializationStrategy = injector.getInstance(MvccEntitySerializationStrategy.class);
uniqueValueSerializationStrategy = injector.getInstance(UniqueValueSerializationStrategy.class);
-
+ String fieldType =
+ line.getOptionValue(ENTITY_FIELD_TYPE_ARG) != null ? line.getOptionValue(ENTITY_FIELD_TYPE_ARG) : "name" ;
String entityType = line.getOptionValue(ENTITY_TYPE_ARG);
String entityName = line.getOptionValue(ENTITY_NAME_ARG);
@@ -149,16 +156,40 @@ public class UniqueValueScanner extends ToolBase {
"collection name).");
}
+ logger.info("Running entity unique load only");
+
+
//do stuff
UniqueValueSet uniqueValueSet = uniqueValueSerializationStrategy.load(
new ApplicationScopeImpl( new SimpleId(appToFilter, "application" ) ),
entityType,
- Collections.singletonList(new StringField( "name", entityName) ));
+ Collections.singletonList(new StringField( fieldType, entityName) ));
+
+ StringBuilder stringBuilder = new StringBuilder();
+
+ stringBuilder.append("[");
- logger.info("Returned unique value set from serialization load = {}", uniqueValueSet);
+ uniqueValueSet.forEach( uniqueValue -> {
+
+
+ String entry = "fieldName="+uniqueValue.getField().getName()+
+ ", fieldValue="+uniqueValue.getField().getValue()+
+ ", uuid="+uniqueValue.getEntityId().getUuid()+
+ ", type="+uniqueValue.getEntityId().getType()+
+ ", version="+uniqueValue.getEntityVersion();
+ stringBuilder.append("{").append(entry).append("},");
+ });
+
+ stringBuilder.deleteCharAt(stringBuilder.length() -1);
+ stringBuilder.append("]");
+
+ logger.info("Returned unique value set from serialization load = {}", stringBuilder.toString());
} else {
+ logger.info("Running entity unique scanner only");
+
+
// scan through all unique values and log some info
Iterator<com.netflix.astyanax.model.Row<ScopedRowKey<TypeField>, EntityVersion>> rows = null;
@@ -181,7 +212,7 @@ public class UniqueValueScanner extends ToolBase {
String scopeType = row.getKey().getScope().getType();
UUID scopeUUID = row.getKey().getScope().getUuid();
- if (!fieldName.equalsIgnoreCase("name") ||
+ if (!fieldName.equalsIgnoreCase(fieldType) ||
(finalAppToFilter != null && !finalAppToFilter.equals(scopeUUID))
) {
// do nothing
[25/38] usergrid git commit: Merge commit 'refs/pull/540/head' of
github.com:apache/usergrid into release-2.1.1
Posted by sn...@apache.org.
Merge commit 'refs/pull/540/head' of github.com:apache/usergrid into release-2.1.1
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/57494925
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/57494925
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/57494925
Branch: refs/heads/usergrid-1268-akka-211
Commit: 57494925989bcd6cc10f09af5d16b6af18d0e707
Parents: cf4c7f8 7f49c80
Author: Michael Russo <mr...@apigee.com>
Authored: Thu Jun 23 15:25:49 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Thu Jun 23 15:25:49 2016 -0700
----------------------------------------------------------------------
.../corepersistence/CpRelationManager.java | 32 +++++---
.../usergrid/rest/management/AdminUsersIT.java | 80 ++++++++++++++++++++
.../cassandra/ManagementServiceImpl.java | 33 +++++---
.../services/devices/DevicesService.java | 2 +
4 files changed, 126 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
[11/38] usergrid git commit: USERGRID-1300: move superuser localhost
check into SecuredResourceFilterFactory
Posted by sn...@apache.org.
USERGRID-1300: move superuser localhost check into SecuredResourceFilterFactory
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/80241689
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/80241689
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/80241689
Branch: refs/heads/usergrid-1268-akka-211
Commit: 802416899ad00f87b06f621fd0c2ff7305aba417
Parents: de6ecb9
Author: Mike Dunker <md...@apigee.com>
Authored: Wed Jun 15 17:23:13 2016 -0700
Committer: Mike Dunker <md...@apigee.com>
Committed: Wed Jun 15 17:23:13 2016 -0700
----------------------------------------------------------------------
.../main/resources/usergrid-default.properties | 4 ++
.../security/SecuredResourceFilterFactory.java | 72 ++++++++++++++++++--
2 files changed, 71 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/80241689/stack/config/src/main/resources/usergrid-default.properties
----------------------------------------------------------------------
diff --git a/stack/config/src/main/resources/usergrid-default.properties b/stack/config/src/main/resources/usergrid-default.properties
index 0fc31ef..d2141cf 100644
--- a/stack/config/src/main/resources/usergrid-default.properties
+++ b/stack/config/src/main/resources/usergrid-default.properties
@@ -535,6 +535,10 @@ usergrid.sysadmin.login.email=super@usergrid.com
usergrid.sysadmin.login.password=test
usergrid.sysadmin.login.allowed=true
+# if usergrid.sysadmin.login.allowed=true, only allows sysadmin login if request is localhost
+# if usergrid.sysadmin.login.allowed=false, this property has no effect
+usergrid.sysadmin.localhost.only=false
+
# Set admin notification email properties
#
usergrid.sysadmin.email=
http://git-wip-us.apache.org/repos/asf/usergrid/blob/80241689/stack/rest/src/main/java/org/apache/usergrid/rest/security/SecuredResourceFilterFactory.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/security/SecuredResourceFilterFactory.java b/stack/rest/src/main/java/org/apache/usergrid/rest/security/SecuredResourceFilterFactory.java
index bd1ab46..85e6210 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/security/SecuredResourceFilterFactory.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/security/SecuredResourceFilterFactory.java
@@ -45,6 +45,7 @@ import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.UriInfo;
import java.io.IOException;
import java.lang.reflect.Method;
+import java.net.InetAddress;
import java.util.Map;
import java.util.Properties;
@@ -68,6 +69,9 @@ public class SecuredResourceFilterFactory implements DynamicFeature {
ManagementService management;
+ private static final int PRIORITY_SUPERUSER = 1;
+ private static final int PRIORITY_DEFAULT = 5000;
+
@Inject
public SecuredResourceFilterFactory() {
@@ -112,6 +116,7 @@ public class SecuredResourceFilterFactory implements DynamicFeature {
@Override
public void configure(ResourceInfo resourceInfo, FeatureContext featureContext) {
+
Method am = resourceInfo.getResourceMethod();
if (logger.isTraceEnabled()) {
@@ -119,20 +124,28 @@ public class SecuredResourceFilterFactory implements DynamicFeature {
resourceInfo.getResourceClass().getSimpleName(), resourceInfo.getResourceMethod().getName());
}
+ boolean sysadminLocalhostOnly =
+ Boolean.parseBoolean(properties.getProperty("usergrid.sysadmin.localhost.only", "false"));
+
+ if (sysadminLocalhostOnly) {
+ // priority = PRIORITY_SUPERUSER forces this to run first
+ featureContext.register( SysadminLocalhostFilter.class, PRIORITY_SUPERUSER );
+ }
+
if ( am.isAnnotationPresent( RequireApplicationAccess.class ) ) {
- featureContext.register( ApplicationFilter.class );
+ featureContext.register( ApplicationFilter.class, PRIORITY_DEFAULT);
}
else if ( am.isAnnotationPresent( RequireOrganizationAccess.class ) ) {
- featureContext.register( OrganizationFilter.class );
+ featureContext.register( OrganizationFilter.class, PRIORITY_DEFAULT);
}
else if ( am.isAnnotationPresent( RequireSystemAccess.class ) ) {
- featureContext.register( SystemFilter.class );
+ featureContext.register( SystemFilter.class, PRIORITY_DEFAULT);
}
else if ( am.isAnnotationPresent( RequireAdminUserAccess.class ) ) {
- featureContext.register( SystemFilter.AdminUserFilter.class );
+ featureContext.register( SystemFilter.AdminUserFilter.class, PRIORITY_DEFAULT);
}
else if ( am.isAnnotationPresent( CheckPermissionsForPath.class ) ) {
- featureContext.register( PathPermissionsFilter.class );
+ featureContext.register( PathPermissionsFilter.class, PRIORITY_DEFAULT);
}
}
@@ -228,6 +241,55 @@ public class SecuredResourceFilterFactory implements DynamicFeature {
}
@Resource
+ public static class SysadminLocalhostFilter extends AbstractFilter {
+
+ @Inject
+ public SysadminLocalhostFilter( UriInfo uriInfo ) {
+ super(uriInfo);
+ }
+
+ @Override
+ public void authorize( ContainerRequestContext request ) {
+ if (logger.isTraceEnabled()) {
+ logger.trace("SysadminLocalhostFilter.authorize");
+ }
+
+ if (!request.getSecurityContext().isUserInRole( ROLE_SERVICE_ADMIN )) {
+ // not a sysadmin request
+ return;
+ }
+
+ boolean isLocalhost = false;
+ try {
+ byte[] address = InetAddress.getByName(request.getUriInfo().getBaseUri().getHost()).getAddress();
+ if (address[0] == 127) {
+ // loopback address
+ isLocalhost = true;
+ } else if (address[0] == 0 && address[1] == 0 && address[2] == 0 && address[3] == 0) {
+ // 0.0.0.0, used for requests like curl 0:8080
+ isLocalhost = true;
+ } else {
+ // everything else
+ isLocalhost = false;
+ }
+ }
+ catch (Exception e) {
+ // couldn't parse host, so assume not localhost
+ logger.error("Unable to parse host for sysadmin request, request rejected: path = {}",
+ request.getUriInfo().getPath());
+ }
+
+ if (!isLocalhost) {
+ throw mappableSecurityException( "unauthorized", "No remote sysadmin access authorized" );
+ }
+
+ if (logger.isTraceEnabled()) {
+ logger.trace("SysadminLocalhostFilter.authorize - leaving");
+ }
+ }
+ }
+
+ @Resource
public static class OrganizationFilter extends AbstractFilter {
@Inject
[10/38] usergrid git commit: Revert "USERGRID-1300: localhost
superuser setting"
Posted by sn...@apache.org.
Revert "USERGRID-1300: localhost superuser setting"
This reverts commit 7ea48c27885da00a9a1d2251702e02bfe8ddf1ef.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/de6ecb91
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/de6ecb91
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/de6ecb91
Branch: refs/heads/usergrid-1268-akka-211
Commit: de6ecb91caafa352dc3e04c0867e0739df8bfe86
Parents: 29c287b
Author: Mike Dunker <md...@apigee.com>
Authored: Wed Jun 15 14:31:16 2016 -0700
Committer: Mike Dunker <md...@apigee.com>
Committed: Wed Jun 15 14:31:16 2016 -0700
----------------------------------------------------------------------
.../main/resources/usergrid-default.properties | 4 ---
.../rest/management/ManagementResource.java | 4 +--
.../shiro/filters/BasicAuthSecurityFilter.java | 19 ++----------
.../management/AccountCreationProps.java | 3 +-
.../usergrid/management/ManagementService.java | 6 +---
.../cassandra/AccountCreationPropsImpl.java | 17 ++---------
.../cassandra/ManagementServiceImpl.java | 32 ++++----------------
.../apache/usergrid/security/shiro/Realm.java | 6 ++++
.../shiro/principals/AdminUserPrincipal.java | 4 +--
.../usergrid/management/OrganizationIT.java | 2 +-
.../cassandra/ManagementServiceIT.java | 6 ++--
11 files changed, 26 insertions(+), 77 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de6ecb91/stack/config/src/main/resources/usergrid-default.properties
----------------------------------------------------------------------
diff --git a/stack/config/src/main/resources/usergrid-default.properties b/stack/config/src/main/resources/usergrid-default.properties
index d2141cf..0fc31ef 100644
--- a/stack/config/src/main/resources/usergrid-default.properties
+++ b/stack/config/src/main/resources/usergrid-default.properties
@@ -535,10 +535,6 @@ usergrid.sysadmin.login.email=super@usergrid.com
usergrid.sysadmin.login.password=test
usergrid.sysadmin.login.allowed=true
-# if usergrid.sysadmin.login.allowed=true, only allows sysadmin login if request is localhost
-# if usergrid.sysadmin.login.allowed=false, this property has no effect
-usergrid.sysadmin.localhost.only=false
-
# Set admin notification email properties
#
usergrid.sysadmin.email=
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de6ecb91/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java
index c4a921c..1aa75ee 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/management/ManagementResource.java
@@ -220,7 +220,7 @@ public class ManagementResource extends AbstractContextResource {
// do checking for different grant types
if ( GrantType.PASSWORD.toString().equals( grant_type ) ) {
try {
- user = management.verifyAdminUserPasswordCredentials( username, password, ui );
+ user = management.verifyAdminUserPasswordCredentials( username, password );
if ( user != null ) {
if (logger.isTraceEnabled()) {
@@ -438,7 +438,7 @@ public class ManagementResource extends AbstractContextResource {
UserInfo user = null;
try {
- user = management.verifyAdminUserPasswordCredentials( username, password, ui );
+ user = management.verifyAdminUserPasswordCredentials( username, password );
}
catch ( Exception e1 ) {
// intentionally empty
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de6ecb91/stack/rest/src/main/java/org/apache/usergrid/rest/security/shiro/filters/BasicAuthSecurityFilter.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/security/shiro/filters/BasicAuthSecurityFilter.java b/stack/rest/src/main/java/org/apache/usergrid/rest/security/shiro/filters/BasicAuthSecurityFilter.java
index 7d6b40c..a5d7272 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/security/shiro/filters/BasicAuthSecurityFilter.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/security/shiro/filters/BasicAuthSecurityFilter.java
@@ -25,7 +25,6 @@ import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.PreMatching;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.ext.Provider;
-import java.net.InetAddress;
import java.security.Principal;
import java.util.Map;
@@ -66,25 +65,11 @@ public class BasicAuthSecurityFilter extends SecurityFilter {
String sysadmin_login_password = properties.getProperty( "usergrid.sysadmin.login.password" );
boolean sysadmin_login_allowed =
Boolean.parseBoolean( properties.getProperty( "usergrid.sysadmin.login.allowed" ) );
- boolean sysadmin_localhost_only =
- Boolean.parseBoolean( properties.getProperty( "usergrid.sysadmin.localhost.only", "false" ) );
-
- boolean is_localhost = false;
- try {
- is_localhost = InetAddress.getByName(request.getUriInfo().getBaseUri().getHost()).isLoopbackAddress();
- }
- catch (Exception e) {
- // won't treat as localhost
- }
- boolean password_match = password.equals( sysadmin_login_password );
- if ( name.equals( sysadmin_login_name ) && (password_match || is_localhost)
- && sysadmin_login_allowed && (is_localhost || !sysadmin_localhost_only)) {
+ if ( name.equals( sysadmin_login_name ) && password.equals( sysadmin_login_password )
+ && sysadmin_login_allowed ) {
request.setSecurityContext( new SysAdminRoleAuthenticator() );
if (logger.isTraceEnabled()) {
logger.trace("System administrator access allowed");
- if (!password_match) {
- logger.trace("Allowed sysadmin password mismatch because accessing via localhost");
- }
}
}
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de6ecb91/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java b/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java
index a5a0751..17f2c6a 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/AccountCreationProps.java
@@ -75,7 +75,6 @@ public interface AccountCreationProps {
String PROPERTIES_SYSADMIN_LOGIN_EMAIL = "usergrid.sysadmin.login.email";
String PROPERTIES_SYSADMIN_LOGIN_NAME = "usergrid.sysadmin.login.name";
String PROPERTIES_SYSADMIN_LOGIN_ALLOWED = "usergrid.sysadmin.login.allowed";
- String PROPERTIES_SYSADMIN_LOCALHOST_ONLY = "usergrid.sysadmin.localhost.only";
String PROPERTIES_ADMIN_SYSADMIN_EMAIL = "usergrid.admin.sysadmin.email";
String PROPERTIES_ORG_SYSADMIN_EMAIL = "usergrid.org.sysadmin.email";
@@ -128,7 +127,7 @@ public interface AccountCreationProps {
SuperUser getSuperUser();
interface SuperUser{
- boolean isEnabled(String host);
+ boolean isEnabled();
String getUsername();
String getEmail();
String getPassword();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de6ecb91/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java b/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java
index 481f272..1d74ec3 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java
@@ -39,8 +39,6 @@ import org.apache.usergrid.services.ServiceResults;
import com.google.common.collect.BiMap;
import rx.Observable;
-import javax.ws.rs.core.UriInfo;
-
public interface ManagementService {
@@ -270,9 +268,7 @@ public interface ManagementService {
boolean verifyAdminUserPassword( UUID userId, String password ) throws Exception;
- UserInfo verifyAdminUserPasswordCredentialsOnly( String name, String password ) throws Exception;
-
- UserInfo verifyAdminUserPasswordCredentials( String name, String password, UriInfo uriInfo ) throws Exception;
+ UserInfo verifyAdminUserPasswordCredentials( String name, String password ) throws Exception;
UserInfo verifyMongoCredentials( String name, String nonce, String key ) throws Exception;
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de6ecb91/stack/services/src/main/java/org/apache/usergrid/management/cassandra/AccountCreationPropsImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/AccountCreationPropsImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/AccountCreationPropsImpl.java
index 4077ef9..7c6a091 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/AccountCreationPropsImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/AccountCreationPropsImpl.java
@@ -17,11 +17,9 @@
package org.apache.usergrid.management.cassandra;
-import java.net.InetAddress;
import java.util.Enumeration;
import java.util.Properties;
-import com.amazonaws.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.usergrid.management.AccountCreationProps;
@@ -133,28 +131,17 @@ public class AccountCreationPropsImpl implements AccountCreationProps {
private final String username;
private final String email;
private final String password;
- private final boolean localhostOnly;
public SuperUserImpl(Properties properties) {
enabled = parseBoolean(properties.getProperty(PROPERTIES_SYSADMIN_LOGIN_ALLOWED));
username = properties.getProperty(PROPERTIES_SYSADMIN_LOGIN_NAME);
email = properties.getProperty(PROPERTIES_SYSADMIN_LOGIN_EMAIL);
password = properties.getProperty(PROPERTIES_SYSADMIN_LOGIN_PASSWORD);
- localhostOnly = parseBoolean(properties.getProperty(PROPERTIES_SYSADMIN_LOCALHOST_ONLY, "false"));
}
@Override
- public boolean isEnabled(String host) {
- boolean isLocalhost = false;
- // if host not passed in, assume not localhost
- if (!StringUtils.isNullOrEmpty(host)) {
- try {
- isLocalhost = InetAddress.getByName(host).isLoopbackAddress();
- } catch (Exception e) {
- // will treat as non-localhost
- }
- }
- return superuserEnabled() && (isLocalhost || !localhostOnly);
+ public boolean isEnabled() {
+ return superuserEnabled();
}
@Override
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de6ecb91/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
index bf20c6d..73a56c8 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
@@ -27,7 +27,6 @@ import com.google.inject.Injector;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang.text.StrSubstitutor;
import org.apache.shiro.UnavailableSecurityManagerException;
-import org.apache.shiro.authc.ExcessiveAttemptsException;
import org.apache.usergrid.corepersistence.service.AggregationService;
import org.apache.usergrid.corepersistence.service.AggregationServiceFactory;
import org.apache.usergrid.corepersistence.service.ApplicationService;
@@ -77,7 +76,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import rx.Observable;
-import javax.ws.rs.core.UriInfo;
import java.nio.ByteBuffer;
import java.util.*;
import java.util.Map.Entry;
@@ -359,13 +357,13 @@ public class ManagementServiceImpl implements ManagementService {
logger.warn( "Test app creation disabled" );
}
- if ( superuserShouldBeProvisioned() ) {
+ if ( superuserEnabled() ) {
provisionSuperuser();
}
}
- public boolean superuserShouldBeProvisioned() {
+ public boolean superuserEnabled() {
boolean superuser_enabled = getBooleanProperty( PROPERTIES_SYSADMIN_LOGIN_ALLOWED );
String superuser_username = properties.getProperty( PROPERTIES_SYSADMIN_LOGIN_NAME );
String superuser_email = properties.getProperty( PROPERTIES_SYSADMIN_LOGIN_EMAIL );
@@ -1349,27 +1347,10 @@ public class ManagementServiceImpl implements ManagementService {
@Override
- public UserInfo verifyAdminUserPasswordCredentials( String name, String password, UriInfo uriInfo ) throws Exception {
- // uriInfo should not be null
- Preconditions.checkArgument(uriInfo != null, "uriInfo parameter should not be null");
-
- return verifyAdminUserPasswordCredentialsInternal(name, password, uriInfo);
- }
-
-
- @Override
- public UserInfo verifyAdminUserPasswordCredentialsOnly( String name, String password ) throws Exception {
- return verifyAdminUserPasswordCredentialsInternal(name, password, null);
- }
-
-
- private UserInfo verifyAdminUserPasswordCredentialsInternal( String name, String password, UriInfo uriInfo)
- throws Exception {
-
- // null UriInfo means assume not a localhost request
+ public UserInfo verifyAdminUserPasswordCredentials( String name, String password ) throws Exception {
if(logger.isTraceEnabled()){
- logger.trace("verifyAdminUserPasswordCredentialsInternal for {}", name);
+ logger.trace("verifyAdminUserPasswordCredentials for {}", name);
}
User user = findUserEntity( smf.getManagementAppId(), name );
@@ -1380,8 +1361,7 @@ public class ManagementServiceImpl implements ManagementService {
if ( verify( smf.getManagementAppId(), user.getUuid(), password ) ) {
UserInfo userInfo = getUserInfo( smf.getManagementAppId(), user );
- boolean userIsSuperAdmin =
- properties.getSuperUser().isEnabled(uriInfo != null ? uriInfo.getBaseUri().getHost() : null)
+ boolean userIsSuperAdmin = properties.getSuperUser().isEnabled()
&& properties.getSuperUser().getEmail().equals(userInfo.getEmail());
boolean testUserEnabled = parseBoolean( properties.getProperty( PROPERTIES_SETUP_TEST_ACCOUNT ) );
@@ -1654,7 +1634,7 @@ public class ManagementServiceImpl implements ManagementService {
Map<UUID, String> organizations;
AccountCreationProps.SuperUser superUser = properties.getSuperUser();
- if ( superUser.isEnabled(null) && superUser.getUsername().equals( user.getUsername() ) ) {
+ if ( superUser.isEnabled() && superUser.getUsername().equals( user.getUsername() ) ) {
int maxOrganizations = this.getAccountCreationProps().getMaxOrganizationsForSuperUserLogin();
organizations = buildOrgBiMap( getOrganizations( null, maxOrganizations ) );
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de6ecb91/stack/services/src/main/java/org/apache/usergrid/security/shiro/Realm.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/security/shiro/Realm.java b/stack/services/src/main/java/org/apache/usergrid/security/shiro/Realm.java
index c8ca812..4381f01 100644
--- a/stack/services/src/main/java/org/apache/usergrid/security/shiro/Realm.java
+++ b/stack/services/src/main/java/org/apache/usergrid/security/shiro/Realm.java
@@ -56,6 +56,12 @@ public class Realm extends AuthorizingRealm {
private TokenService tokens;
+ @Value( "${" + PROPERTIES_SYSADMIN_LOGIN_ALLOWED + "}" )
+ private boolean superUserEnabled;
+ @Value( "${" + AccountCreationProps.PROPERTIES_SYSADMIN_LOGIN_NAME + ":admin}" )
+ private String superUser;
+
+
public Realm() {
setCredentialsMatcher(new AllowAllCredentialsMatcher());
setPermissionResolver(new CustomPermissionResolver());
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de6ecb91/stack/services/src/main/java/org/apache/usergrid/security/shiro/principals/AdminUserPrincipal.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/security/shiro/principals/AdminUserPrincipal.java b/stack/services/src/main/java/org/apache/usergrid/security/shiro/principals/AdminUserPrincipal.java
index fd4f0c5..a594d1e 100644
--- a/stack/services/src/main/java/org/apache/usergrid/security/shiro/principals/AdminUserPrincipal.java
+++ b/stack/services/src/main/java/org/apache/usergrid/security/shiro/principals/AdminUserPrincipal.java
@@ -66,9 +66,9 @@ public class AdminUserPrincipal extends UserPrincipal {
ApplicationInfo application = null;
boolean superUserEnabled = false;
- final String sysadminLoginAllowedProp = management.getProperties().getProperty(
+ final String s = management.getProperties().getProperty(
AccountCreationProps.PROPERTIES_SYSADMIN_LOGIN_ALLOWED);
- if ( sysadminLoginAllowedProp != null && "true".equalsIgnoreCase(sysadminLoginAllowedProp.trim())) {
+ if ( s != null && "true".equalsIgnoreCase(s.trim())) {
superUserEnabled = true;
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de6ecb91/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java b/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
index 44599a6..9d20dcb 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
@@ -103,7 +103,7 @@ public class OrganizationIT {
setup.getEntityIndex().refresh(CpNamingUtils.MANAGEMENT_APPLICATION_ID);
- UserInfo u = setup.getMgmtSvc().verifyAdminUserPasswordCredentialsOnly(
+ UserInfo u = setup.getMgmtSvc().verifyAdminUserPasswordCredentials(
organization.getOwner().getUuid().toString(), "test" );
assertNotNull( u );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de6ecb91/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
index 83ceae9..6179a6d 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
@@ -480,15 +480,15 @@ public class ManagementServiceIT {
EntityManager em = setup.getEmf().getEntityManager( setup.getSmf().getManagementAppId() );
setup.getEntityIndex().refresh(applicationId);
- UserInfo authedUser = setup.getMgmtSvc().verifyAdminUserPasswordCredentialsOnly( username, password );
+ UserInfo authedUser = setup.getMgmtSvc().verifyAdminUserPasswordCredentials( username, password );
assertEquals( adminUser.getUuid(), authedUser.getUuid() );
- authedUser = setup.getMgmtSvc().verifyAdminUserPasswordCredentialsOnly( adminUser.getEmail(), password );
+ authedUser = setup.getMgmtSvc().verifyAdminUserPasswordCredentials( adminUser.getEmail(), password );
assertEquals( adminUser.getUuid(), authedUser.getUuid() );
- authedUser = setup.getMgmtSvc().verifyAdminUserPasswordCredentialsOnly( adminUser.getUuid().toString(), password );
+ authedUser = setup.getMgmtSvc().verifyAdminUserPasswordCredentials( adminUser.getUuid().toString(), password );
assertEquals( adminUser.getUuid(), authedUser.getUuid() );
}
[26/38] usergrid git commit: Fix NPE with batch creation of entities.
Posted by sn...@apache.org.
Fix NPE with batch creation of entities.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/e982ba4e
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/e982ba4e
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/e982ba4e
Branch: refs/heads/usergrid-1268-akka-211
Commit: e982ba4ed97cf9993cbc21460791207a8f6bb62d
Parents: 5749492
Author: Michael Russo <mr...@apigee.com>
Authored: Thu Jun 23 15:54:55 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Thu Jun 23 15:54:55 2016 -0700
----------------------------------------------------------------------
.../org/apache/usergrid/services/AbstractCollectionService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/e982ba4e/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java b/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
index cbea659..7539e0c 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/AbstractCollectionService.java
@@ -391,7 +391,7 @@ public class AbstractCollectionService extends AbstractService {
for ( Map<String, Object> p : batch ) {
// track unique name value in the batch to identify if duplicates are trying to be created
- String name = p.get("name").toString();
+ String name = (String) p.get("name");
if( name !=null && nameValues.get(name) !=null ){
logger.warn("Batch contains more than 1 entity with the same name: {}", name);
}else{
[34/38] usergrid git commit: Enhance some logic around deleting of
edges.
Posted by sn...@apache.org.
Enhance some logic around deleting of edges.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/9c4b5242
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/9c4b5242
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/9c4b5242
Branch: refs/heads/usergrid-1268-akka-211
Commit: 9c4b5242a169cb4e90922c3fc7755be3bdac8be8
Parents: 09280b1
Author: Michael Russo <mr...@apigee.com>
Authored: Mon Jun 27 21:13:45 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Mon Jun 27 21:13:45 2016 -0700
----------------------------------------------------------------------
.../corepersistence/CpRelationManager.java | 40 ++++++++---------
.../asyncevents/EventBuilderImpl.java | 7 ++-
.../index/impl/EsEntityIndexImpl.java | 47 +++++++-------------
3 files changed, 37 insertions(+), 57 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/9c4b5242/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
index 39b3161..6e1bade 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpRelationManager.java
@@ -524,44 +524,42 @@ public class CpRelationManager implements RelationManager {
}
Id entityId = new SimpleId( itemRef.getUuid(), itemRef.getType() );
- org.apache.usergrid.persistence.model.entity.Entity memberEntity = ( ( CpEntityManager ) em ).load( entityId );
-
// remove edge from collection to item
GraphManager gm = managerCache.getGraphManager( applicationScope );
- List<Edge> removedEdges = new ArrayList<>();
- //run our delete
- gm.loadEdgeVersions(
- CpNamingUtils.createEdgeFromCollectionName( cpHeadEntity.getId(), collectionName, memberEntity.getId() ) )
- .flatMap(edge -> gm.markEdge(edge)).flatMap(edge -> gm.deleteEdge(edge))
- .doOnNext(edge -> removedEdges.add(edge)).toBlocking()
- .lastOrDefault(null);
+ // mark the edge versions and take the first for later delete edge queue event ( load is descending )
+ final Edge markedSourceEdge = gm.loadEdgeVersions(
+ CpNamingUtils.createEdgeFromCollectionName( cpHeadEntity.getId(), collectionName, entityId ) )
+ .flatMap(edge -> gm.markEdge(edge)).toBlocking().firstOrDefault(null);
+
+
+ Edge markedReversedEdge = null;
CollectionInfo collection = getDefaultSchema().getCollection( headEntity.getType(), collectionName );
if (collection != null && collection.getLinkedCollection() != null) {
// delete reverse edges
final String pluralType = InflectionUtils.pluralize( cpHeadEntity.getId().getType() );
- gm.loadEdgeVersions(
- CpNamingUtils.createEdgeFromCollectionName( memberEntity.getId(), pluralType, cpHeadEntity.getId() ) )
- .flatMap(reverseEdge -> gm.markEdge(reverseEdge))
- .flatMap(reverseEdge -> gm.deleteEdge(reverseEdge))
- .doOnNext(reverseEdge -> removedEdges.add(reverseEdge))
- .toBlocking().lastOrDefault(null);
+ markedReversedEdge = gm.loadEdgeVersions(
+ CpNamingUtils.createEdgeFromCollectionName( entityId, pluralType, cpHeadEntity.getId() ) )
+ .flatMap(reverseEdge -> gm.markEdge(reverseEdge)).toBlocking().firstOrDefault(null);
}
/**
- * Remove from the index
+ * Remove from the index. This will call gm.deleteEdge which also deletes the reverse edge(s) and de-indexes
+ * older versions of the edge(s).
*
*/
+ if( markedSourceEdge != null ) {
+ indexService.queueDeleteEdge(applicationScope, markedSourceEdge);
+ }
+ if( markedReversedEdge != null ){
+ indexService.queueDeleteEdge(applicationScope, markedReversedEdge);
+ }
- // item not deindexed, only edges
- removedEdges.forEach(edge -> {
- indexService.queueDeleteEdge(applicationScope, edge);
- });
// special handling for roles collection of a group
if ( headEntity.getType().equals( Group.ENTITY_TYPE ) ) {
@@ -572,7 +570,7 @@ public class CpRelationManager implements RelationManager {
if ( path.startsWith( "/roles/" ) ) {
Entity itemEntity =
- em.get( new SimpleEntityRef( memberEntity.getId().getType(), memberEntity.getId().getUuid() ) );
+ em.get( new SimpleEntityRef( entityId.getType(), entityId.getUuid() ) );
RoleRef roleRef = SimpleRoleRef.forRoleEntity( itemEntity );
em.deleteRole( roleRef.getApplicationRoleName(), Optional.fromNullable(itemEntity) );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/9c4b5242/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java
index 02a7588..bbdce5a 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java
@@ -96,10 +96,9 @@ public class EventBuilderImpl implements EventBuilder {
logger.debug("Deleting in app scope {} with edge {}", applicationScope, edge);
}
- return indexService.deleteIndexEdge( applicationScope, edge ).flatMap( batch -> {
- final GraphManager gm = graphManagerFactory.createEdgeManager( applicationScope );
- return gm.deleteEdge( edge ).map( deletedEdge -> batch );
- } );
+ final GraphManager gm = graphManagerFactory.createEdgeManager( applicationScope );
+ return gm.deleteEdge( edge )
+ .flatMap( deletedEdge -> indexService.deleteIndexEdge( applicationScope, deletedEdge ));
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/9c4b5242/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
index 3b60b57..dc110f7 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
@@ -466,8 +466,8 @@ public class EsEntityIndexImpl implements EntityIndex,VersionedData {
SearchResponse searchResponse;
List<CandidateResult> candidates = new ArrayList<>();
- //never let the limit be less than 2 as there are potential indefinite paging issues
- final int searchLimit = Math.max(2, indexFig.getVersionQueryLimit());
+ // never let this fetch more than 100 to save memory
+ final int searchLimit = Math.min(100, indexFig.getVersionQueryLimit());
final QueryBuilder entityQuery = QueryBuilders
.termQuery(IndexingUtils.EDGE_NODE_ID_FIELDNAME, IndexingUtils.nodeId(edge.getNodeId()));
@@ -485,41 +485,24 @@ public class EsEntityIndexImpl implements EntityIndex,VersionedData {
long queryTimestamp = 0L;
- while(true){
-
- QueryBuilder timestampQuery = QueryBuilders
- .rangeQuery(IndexingUtils.EDGE_TIMESTAMP_FIELDNAME)
- .gte(queryTimestamp);
-
- QueryBuilder finalQuery = QueryBuilders
- .boolQuery()
- .must(entityQuery)
- .must(timestampQuery);
-
- searchResponse = srb
- .setQuery(finalQuery)
- .setSize(searchLimit)
- .execute()
- .actionGet();
-
- int responseSize = searchResponse.getHits().getHits().length;
- if(responseSize == 0){
- break;
- }
- // update queryTimestamp to be the timestamp of the last entity returned from the query
- queryTimestamp = (long) searchResponse
- .getHits().getAt(responseSize - 1)
- .getSource().get(IndexingUtils.EDGE_TIMESTAMP_FIELDNAME);
+ QueryBuilder timestampQuery = QueryBuilders
+ .rangeQuery(IndexingUtils.EDGE_TIMESTAMP_FIELDNAME)
+ .gte(queryTimestamp);
- candidates = aggregateScrollResults(candidates, searchResponse, null);
+ QueryBuilder finalQuery = QueryBuilders
+ .boolQuery()
+ .must(entityQuery)
+ .must(timestampQuery);
- if(responseSize < searchLimit){
+ searchResponse = srb
+ .setQuery(finalQuery)
+ .setSize(searchLimit)
+ .execute()
+ .actionGet();
- break;
- }
+ candidates = aggregateScrollResults(candidates, searchResponse, null);
- }
}
catch ( Throwable t ) {
logger.error( "Unable to communicate with Elasticsearch", t.getMessage() );