From commits-return-2116-apmail-usergrid-commits-archive=usergrid.apache.org@usergrid.incubator.apache.org Tue Feb 25 06:21:39 2014 Return-Path: X-Original-To: apmail-usergrid-commits-archive@minotaur.apache.org Delivered-To: apmail-usergrid-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D6CD810A16 for ; Tue, 25 Feb 2014 06:21:39 +0000 (UTC) Received: (qmail 18147 invoked by uid 500); 25 Feb 2014 06:21:38 -0000 Delivered-To: apmail-usergrid-commits-archive@usergrid.apache.org Received: (qmail 18123 invoked by uid 500); 25 Feb 2014 06:21:37 -0000 Mailing-List: contact commits-help@usergrid.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@usergrid.incubator.apache.org Delivered-To: mailing list commits@usergrid.incubator.apache.org Received: (qmail 17509 invoked by uid 99); 25 Feb 2014 06:21:18 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Feb 2014 06:21:18 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 60D0D9258B2; Tue, 25 Feb 2014 06:21:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: snoopdave@apache.org To: commits@usergrid.apache.org Date: Tue, 25 Feb 2014 06:21:26 -0000 Message-Id: <3c1fb20ab52148b59d1a963f0b8e0da3@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [12/50] [abbrv] git commit: Took out the dumping of the collections file. Now only collection/app data is dumped into s3. Took out the dumping of the collections file. Now only collection/app data is dumped into s3. Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/d1a4c0d4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/d1a4c0d4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/d1a4c0d4 Branch: refs/pull/60/merge Commit: d1a4c0d48fb49969a92c35f30ffb1acf3c351e32 Parents: 6604061 Author: GERey Authored: Thu Feb 6 13:35:24 2014 -0800 Committer: GERey Committed: Thu Feb 6 13:35:24 2014 -0800 ---------------------------------------------------------------------- .../management/export/ExportServiceImpl.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d1a4c0d4/stack/services/src/main/java/org/usergrid/management/export/ExportServiceImpl.java ---------------------------------------------------------------------- diff --git a/stack/services/src/main/java/org/usergrid/management/export/ExportServiceImpl.java b/stack/services/src/main/java/org/usergrid/management/export/ExportServiceImpl.java index b9cacc7..5fd6a58 100644 --- a/stack/services/src/main/java/org/usergrid/management/export/ExportServiceImpl.java +++ b/stack/services/src/main/java/org/usergrid/management/export/ExportServiceImpl.java @@ -181,12 +181,16 @@ public class ExportServiceImpl implements ExportService{ // Get the JSon serializer. //Creates the applications folder - JsonGenerator jg = getJsonGenerator( createOutputFile( "application", application.getValue() ) ); - - //JsonGenerator jg = getJsonGenerator( new File( "/Users/ApigeeCorporation/derp.txt" )); + /* What needs to be done: + * take the file name generator and create one that will only output the collections we need + * this will probably icnlude taking both file names, and making sure that it is not doing + * two passes as todd had it originally. */ + // JsonGenerator jg = getJsonGenerator( createOutputFile( "application", application.getValue() ) ); + String appFileName = prepareOutputFileName( "application", application.getValue() ); + JsonGenerator jg = getJsonGenerator( new File( appFileName ) ); // load the dictionary @@ -228,7 +232,10 @@ public class ExportServiceImpl implements ExportService{ jg.writeObject( nsEntity ); // Create a GENERATOR for the application collections. - JsonGenerator collectionsJg = getJsonGenerator( createOutputFile( "collections", application.getValue() ) ); + //JsonGenerator collectionsJg = getJsonGenerator( createOutputFile( "collections", application.getValue() ) ); + + String collectionsFilename = prepareOutputFileName( "collections","appDummyName" ); + JsonGenerator collectionsJg = getJsonGenerator( new File( collectionsFilename ) ); collectionsJg.writeStartObject(); @@ -276,7 +283,9 @@ public class ExportServiceImpl implements ExportService{ // Close writer and file for this application. jg.writeEndArray(); jg.close(); - copyToS3( filename , config ); + copyToS3( appFileName , config ); + //below line doesn't copy very good data anyways. + //copyToS3( collectionsFilename, config ); } }