You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by ma...@apache.org on 2015/10/15 18:28:24 UTC

[1/4] oodt git commit: [maven-release-plugin] copy for tag 0.10-rc2

Repository: oodt
Updated Branches:
  refs/heads/OODT-755 [created] c8804a9b1


[maven-release-plugin] copy for tag 0.10-rc2

git-svn-id: https://svn.apache.org/repos/asf/oodt/tags/0.10-rc2@1701320 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/c0e9e7e0
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/c0e9e7e0
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/c0e9e7e0

Branch: refs/heads/OODT-755
Commit: c0e9e7e041c8d5d89a44da228b75dc4f14b860a5
Parents: c7378fc
Author: Chris Mattmann <ma...@apache.org>
Authored: Fri Sep 4 19:46:49 2015 +0000
Committer: Chris Mattmann <ma...@apache.org>
Committed: Fri Sep 4 19:46:49 2015 +0000

----------------------------------------------------------------------

----------------------------------------------------------------------



[2/4] oodt git commit: Release Apache OODT 0.10 from RC2.

Posted by ma...@apache.org.
Release Apache OODT 0.10 from RC2.

git-svn-id: https://svn.apache.org/repos/asf/oodt/tags/0.10@1702809 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/988e58db
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/988e58db
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/988e58db

Branch: refs/heads/OODT-755
Commit: 988e58dbc94a679f24aced5d2b72fa6e161aa492
Parents: c0e9e7e
Author: Chris Mattmann <ma...@apache.org>
Authored: Sun Sep 13 19:40:39 2015 +0000
Committer: Chris Mattmann <ma...@apache.org>
Committed: Sun Sep 13 19:40:39 2015 +0000

----------------------------------------------------------------------

----------------------------------------------------------------------



[4/4] oodt git commit: OODT-755 fix exception

Posted by ma...@apache.org.
OODT-755 fix exception


Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/c8804a9b
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/c8804a9b
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/c8804a9b

Branch: refs/heads/OODT-755
Commit: c8804a9b15186704ed891e006b7b1155eb6f1904
Parents: 3ecdfb9
Author: Tom Barber <to...@analytical-labs.com>
Authored: Thu Oct 15 17:27:29 2015 +0100
Committer: Tom Barber <to...@analytical-labs.com>
Committed: Thu Oct 15 17:27:29 2015 +0100

----------------------------------------------------------------------
 .../org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oodt/blob/c8804a9b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
index e3c4bcf..f22ab6c 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
@@ -1060,12 +1060,13 @@ public class XmlRpcFileManager {
         return metadata;
     }
 
-    private Metadata runExtractors(Product product, Metadata metadata) {
+    private Metadata runExtractors(Product product, Metadata metadata) throws CatalogException {
         // make sure that the product type definition is present
         if(product.getProductType() == null){
           LOG.log(Level.SEVERE, "Failed to run extractor for: "+product.getProductId()+":"+product
               .getProductName()+" product type cannot be null.");
-          return null;
+          throw new CatalogException("Failed to run extractor for: "+product.getProductId()+":"+product
+              .getProductName()+" product type cannot be null.");
         }
         try {
             product.setProductType(repositoryManager.getProductTypeById(product


[3/4] oodt git commit: OODT-775 fix error message

Posted by ma...@apache.org.
OODT-775 fix error message


Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/3ecdfb90
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/3ecdfb90
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/3ecdfb90

Branch: refs/heads/OODT-755
Commit: 3ecdfb90aaaf39c86349ec7e301ab3164c203d1e
Parents: 988e58d
Author: Tom Barber <to...@analytical-labs.com>
Authored: Thu Oct 15 17:14:45 2015 +0100
Committer: Tom Barber <to...@analytical-labs.com>
Committed: Thu Oct 15 17:14:45 2015 +0100

----------------------------------------------------------------------
 .../cas/filemgr/system/XmlRpcFileManager.java   | 61 ++++++----------
 .../filemgr/system/XmlRpcFileManagerClient.java | 76 ++++++++++----------
 2 files changed, 59 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oodt/blob/3ecdfb90/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
index 2338547..e3c4bcf 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
@@ -18,30 +18,16 @@
 package org.apache.oodt.cas.filemgr.system;
 
 //APACHE imports
-import org.apache.xmlrpc.WebServer;
+import com.google.common.collect.Lists;
 
-//OODT imports
-import org.apache.oodt.cas.metadata.Metadata;
-import org.apache.oodt.cas.metadata.exceptions.MetExtractionException;
-import org.apache.oodt.commons.date.DateUtils;
 import org.apache.oodt.cas.filemgr.catalog.Catalog;
+import org.apache.oodt.cas.filemgr.datatransfer.DataTransfer;
+import org.apache.oodt.cas.filemgr.datatransfer.TransferStatusTracker;
 import org.apache.oodt.cas.filemgr.metadata.ProductMetKeys;
 import org.apache.oodt.cas.filemgr.metadata.extractors.FilemgrMetExtractor;
 import org.apache.oodt.cas.filemgr.repository.RepositoryManager;
-import org.apache.oodt.cas.filemgr.structs.Element;
-import org.apache.oodt.cas.filemgr.structs.ExtractorSpec;
-import org.apache.oodt.cas.filemgr.structs.FileTransferStatus;
-import org.apache.oodt.cas.filemgr.structs.ProductPage;
-import org.apache.oodt.cas.filemgr.structs.ProductType;
-import org.apache.oodt.cas.filemgr.structs.Product;
-import org.apache.oodt.cas.filemgr.structs.Query;
-import org.apache.oodt.cas.filemgr.structs.Reference;
-import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
-import org.apache.oodt.cas.filemgr.structs.exceptions.QueryFormulationException;
-import org.apache.oodt.cas.filemgr.structs.exceptions.RepositoryManagerException;
-import org.apache.oodt.cas.filemgr.structs.exceptions.DataTransferException;
-import org.apache.oodt.cas.filemgr.structs.exceptions.ValidationLayerException;
-import org.apache.oodt.cas.filemgr.structs.exceptions.VersioningException;
+import org.apache.oodt.cas.filemgr.structs.*;
+import org.apache.oodt.cas.filemgr.structs.exceptions.*;
 import org.apache.oodt.cas.filemgr.structs.query.ComplexQuery;
 import org.apache.oodt.cas.filemgr.structs.query.QueryFilter;
 import org.apache.oodt.cas.filemgr.structs.query.QueryResult;
@@ -49,35 +35,25 @@ import org.apache.oodt.cas.filemgr.structs.query.QueryResultComparator;
 import org.apache.oodt.cas.filemgr.structs.query.filter.ObjectTimeEvent;
 import org.apache.oodt.cas.filemgr.structs.query.filter.TimeEvent;
 import org.apache.oodt.cas.filemgr.structs.type.TypeHandler;
-import org.apache.oodt.cas.filemgr.datatransfer.DataTransfer;
 import org.apache.oodt.cas.filemgr.util.GenericFileManagerObjectFactory;
 import org.apache.oodt.cas.filemgr.util.XmlRpcStructFactory;
 import org.apache.oodt.cas.filemgr.versioning.Versioner;
 import org.apache.oodt.cas.filemgr.versioning.VersioningUtils;
-import org.apache.oodt.cas.filemgr.datatransfer.TransferStatusTracker;
-
-import com.google.common.collect.Lists;
-
-
-
+import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.oodt.cas.metadata.exceptions.MetExtractionException;
+import org.apache.oodt.commons.date.DateUtils;
+import org.apache.xmlrpc.WebServer;
 
-//JDK imports
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.Arrays;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Vector;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.FileNotFoundException;
+import java.io.*;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
+import java.util.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+//OODT imports
+//JDK imports
 
 /**
  * @author mattmann
@@ -1086,6 +1062,11 @@ public class XmlRpcFileManager {
 
     private Metadata runExtractors(Product product, Metadata metadata) {
         // make sure that the product type definition is present
+        if(product.getProductType() == null){
+          LOG.log(Level.SEVERE, "Failed to run extractor for: "+product.getProductId()+":"+product
+              .getProductName()+" product type cannot be null.");
+          return null;
+        }
         try {
             product.setProductType(repositoryManager.getProductTypeById(product
                     .getProductType().getProductTypeId()));

http://git-wip-us.apache.org/repos/asf/oodt/blob/3ecdfb90/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManagerClient.java
----------------------------------------------------------------------
diff --git a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManagerClient.java b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManagerClient.java
index 7ea3129..c26eaec 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManagerClient.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManagerClient.java
@@ -18,48 +18,34 @@
 package org.apache.oodt.cas.filemgr.system;
 
 //APACHE imports
-import org.apache.xmlrpc.CommonsXmlRpcTransport;
-import org.apache.xmlrpc.XmlRpcClient;
-import org.apache.xmlrpc.XmlRpcClientException;
-import org.apache.xmlrpc.XmlRpcException;
-import org.apache.xmlrpc.XmlRpcTransport;
-import org.apache.xmlrpc.XmlRpcTransportFactory;
-//JDK imports
-import java.net.URL;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Vector;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.File;
-//OODT imports
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.HttpMethod;
 import org.apache.commons.httpclient.HttpMethodRetryHandler;
 import org.apache.commons.httpclient.params.HttpMethodParams;
-import org.apache.oodt.cas.metadata.Metadata;
 import org.apache.oodt.cas.cli.CmdLineUtility;
-import org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException;
-import org.apache.oodt.cas.filemgr.structs.exceptions.RepositoryManagerException;
-import org.apache.oodt.cas.filemgr.structs.exceptions.ValidationLayerException;
-import org.apache.oodt.cas.filemgr.structs.Element;
-import org.apache.oodt.cas.filemgr.structs.FileTransferStatus;
-import org.apache.oodt.cas.filemgr.structs.ProductPage;
-import org.apache.oodt.cas.filemgr.structs.ProductType;
-import org.apache.oodt.cas.filemgr.structs.Product;
-import org.apache.oodt.cas.filemgr.structs.Query;
-import org.apache.oodt.cas.filemgr.structs.Reference;
-import org.apache.oodt.cas.filemgr.util.GenericFileManagerObjectFactory;
-import org.apache.oodt.cas.filemgr.util.XmlRpcStructFactory;
-import org.apache.oodt.cas.filemgr.versioning.Versioner;
-import org.apache.oodt.cas.filemgr.structs.exceptions.VersioningException;
 import org.apache.oodt.cas.filemgr.datatransfer.DataTransfer;
-import org.apache.oodt.cas.filemgr.structs.exceptions.DataTransferException;
-import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
+import org.apache.oodt.cas.filemgr.structs.*;
+import org.apache.oodt.cas.filemgr.structs.exceptions.*;
 import org.apache.oodt.cas.filemgr.structs.query.ComplexQuery;
 import org.apache.oodt.cas.filemgr.structs.query.QueryResult;
+import org.apache.oodt.cas.filemgr.util.GenericFileManagerObjectFactory;
+import org.apache.oodt.cas.filemgr.util.XmlRpcStructFactory;
+import org.apache.oodt.cas.filemgr.versioning.Versioner;
+import org.apache.oodt.cas.metadata.Metadata;
+import org.apache.xmlrpc.*;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Vector;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+//JDK imports
+//OODT imports
 
 /**
  * @author mattmann (Chris Mattmann)
@@ -1286,10 +1272,24 @@ public class XmlRpcFileManagerClient {
                         + product.getProductType().getVersioner()
                         + ": Message: " + e.getMessage());
             throw new VersioningException(e);
-        } catch (Exception e) {
-            e.printStackTrace();
-            LOG.log(Level.SEVERE, "Failed to ingest product [" + product
-                    + "] : " + e.getMessage() + " -- rolling back ingest");
+        } catch(XmlRpcException e2){
+          LOG.log(Level.SEVERE, "Failed to ingest product [ name:" +product.getProductName() + "] :" + e2.getMessage() + " -- rolling back ingest");
+          try {
+            Vector<Object> argList = new Vector<Object>();
+            Hashtable<String, Object> productHash = XmlRpcStructFactory
+                .getXmlRpcProduct(product);
+            argList.add(productHash);
+            client.execute("filemgr.removeProduct", argList);
+          } catch (Exception e1) {
+            LOG.log(Level.SEVERE, "Failed to rollback ingest of product ["
+                                  + product + "] : " + e2.getMessage());
+          }
+          throw new Exception(e2);
+        }
+        catch (Exception e) {
+            //e.printStackTrace();
+          LOG.log(Level.SEVERE, "Failed to ingest product [ id: " + product.getProductId() +
+                                "/ name:" +product.getProductName() + "] :" + e.getMessage() + " -- rolling back ingest");
             try {
                 Vector<Object> argList = new Vector<Object>();
                 Hashtable<String, Object> productHash = XmlRpcStructFactory