usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [24/31] incubator-usergrid git commit: Merge remote-tracking branch 'origin/USERGRID-432' into USERGRID-416
Date Mon, 09 Mar 2015 15:25:37 GMT
Merge remote-tracking branch 'origin/USERGRID-432' into USERGRID-416


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/046ba4eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/046ba4eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/046ba4eb

Branch: refs/heads/USERGRID-405
Commit: 046ba4ebd884e02e4b34a7101a1b39504b174b36
Parents: 729c675 6066b6e
Author: Todd Nine <tnine@apigee.com>
Authored: Fri Mar 6 17:57:21 2015 -0700
Committer: Todd Nine <tnine@apigee.com>
Committed: Fri Mar 6 17:57:21 2015 -0700

----------------------------------------------------------------------
 .../Client/IUsergridClient.cs                   |  2 +-
 .../Usergrid.Notifications/Client/PushClient.cs | 24 ++++++++++++
 .../Usergrid.Notifications/MainPage.xaml        |  1 +
 .../Usergrid.Notifications/MainPage.xaml.cs     | 29 +++++++++++----
 .../corepersistence/CpEntityManagerFactory.java | 11 +-----
 .../cassandra/EntityManagerFactoryImplIT.java   |  1 +
 .../persistence/index/IndexBufferProducer.java  | 10 +++--
 .../usergrid/persistence/index/IndexFig.java    | 12 +++++-
 .../index/impl/EsEntityIndexImpl.java           | 32 +++++++++++-----
 .../index/impl/EsIndexBufferConsumerImpl.java   | 39 +++++++++++++++++++-
 .../index/impl/EsIndexBufferProducerImpl.java   | 30 ++++++++++-----
 .../persistence/index/impl/EntityIndexTest.java |  2 +-
 .../services/notifications/wns/WNSAdapter.java  | 39 ++++++++++++++++++++
 13 files changed, 187 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/046ba4eb/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/046ba4eb/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
----------------------------------------------------------------------
diff --cc stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
index da1217c,eac3822..951f96b
--- 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
@@@ -240,17 -193,21 +241,30 @@@ public class EsEntityIndexImpl implemen
  
              String[] indexNames = getIndexes(AliasType.Write);
  
 -            for (String currentIndex : indexNames) {
 +            for (String currentIndex : indexNames){
++
++                final Timer.Context timeRemoveAlias = removeAliasTimer.time();
+                 try {
 -                    isAck = adminClient.indices().prepareAliases().removeAlias(currentIndex,
 +                //Added For Graphite Metrics
-                 Timer.Context timeRemoveAlias = removeAliasTimer.time();
++
 +                isAck = adminClient.indices().prepareAliases().removeAlias(currentIndex,
                          alias.getWriteAlias()).execute().actionGet().isAcknowledged();
-                 timeRemoveAlias.stop();
+ 
 -                    logger.info("Removed Index Name [{}] from Alias=[{}] ACK=[{}]", currentIndex,
alias, isAck);
 +                logger.info("Removed Index Name [{}] from Alias=[{}] ACK=[{}]", currentIndex,
alias, isAck);
+                 } catch (AliasesMissingException aie) {
 -                    logger.info("Alias does not exist Index Name [{}] from Alias=[{}] ACK=[{}]",
currentIndex, alias, aie.getMessage());
 -                    continue;
 -                }catch(InvalidAliasNameException iane) {
 -                    logger.info("Alias does not exist Index Name [{}] from Alias=[{}] ACK=[{}]",
currentIndex, alias, iane.getMessage());
 -                    continue;
++                                   logger.info("Alias does not exist Index Name [{}] from
Alias=[{}] ACK=[{}]", currentIndex, alias, aie.getMessage());
++                                   continue;
++                               }catch(InvalidAliasNameException iane) {
++                                   logger.info("Alias does not exist Index Name [{}] from
Alias=[{}] ACK=[{}]", currentIndex, alias, iane.getMessage());
++                                   continue;
++                               }finally{
++                    timeRemoveAlias.stop();
++
+                 }
              }
  
 +            //Added For Graphite Metrics
 +            Timer.Context timeAddReadAlias = addReadAliasTimer.time();
              // add read alias
              isAck = adminClient.indices().prepareAliases().addAlias(
                      indexName, alias.getReadAlias()).execute().actionGet().isAcknowledged();
@@@ -326,10 -279,8 +340,10 @@@
      private void createMappings() throws IOException {
  
          XContentBuilder xcb = IndexingUtils.createDoubleStringIndexMapping(
-                 XContentFactory.jsonBuilder(), "_default_");
+             XContentFactory.jsonBuilder(), "_default_");
  
 +        //Added For Graphite Metrics
 +        Timer.Context timePutIndex = mappingTimer.time();
          PutIndexTemplateResponse pitr = esProvider.getClient().admin().indices()
                  .preparePutTemplate("usergrid_template")
                  // set mapping as the default for all types
@@@ -590,30 -529,24 +604,30 @@@
  
          String idString = IndexingUtils.idString(entityId).toLowerCase();
  
-         final TermQueryBuilder tqb = QueryBuilders.termQuery( ENTITYID_ID_FIELDNAME, idString
);
+         final TermQueryBuilder tqb = QueryBuilders.termQuery(ENTITYID_ID_FIELDNAME, idString);
  
 +        //Added For Graphite Metrics
 +        final Timer.Context timeDeleteAllVersions =allVersionsTimer.time();
          final ListenableActionFuture<DeleteByQueryResponse> response = esProvider.getClient()
              .prepareDeleteByQuery( alias.getWriteAlias() ).setQuery( tqb ).execute();
  
 -        response.addListener(new ActionListener<DeleteByQueryResponse>() {
 +        response.addListener( new ActionListener<DeleteByQueryResponse>() {
 +
              @Override
 -            public void onResponse(DeleteByQueryResponse response) {
 -                logger.debug("Deleted entity {}:{} from all index scopes with response status
= {}",
 -                    entityId.getType(), entityId.getUuid(), response.status().toString());
 +            public void onResponse( DeleteByQueryResponse response) {
 +                timeDeleteAllVersions.stop();
 +                logger
 +                    .debug("Deleted entity {}:{} from all index scopes with response status
= {}", entityId.getType(),
 +                        entityId.getUuid(), response.status().toString() );
  
-                 checkDeleteByQueryResponse( tqb, response );
+                 checkDeleteByQueryResponse(tqb, response);
              }
  
 +
              @Override
 -            public void onFailure(Throwable e) {
 -                logger.error("Deleted entity {}:{} from all index scopes with error {}",
 -                    entityId.getType(), entityId.getUuid(), e);
 +            public void onFailure( Throwable e ) {
 +                logger.error( "Deleted entity {}:{} from all index scopes with error {}",
entityId.getType(),
 +                    entityId.getUuid(), e);
  
  
              }


Mime
View raw message