Author: lewismc
Date: Tue Sep 8 04:25:17 2015
New Revision: 1701724
URL: http://svn.apache.org/r1701724
Log:
OODT-858 Integrate Avro RPC with the filemanager module and OODT-856 Separate
XMLRPC from OODT logic in the filemgr module
Added:
oodt/branches/avro_rpc/filemgr/src/main/avro/
oodt/branches/avro_rpc/filemgr/src/main/avro/types/
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroComplexQuery.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroElement.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroExtractorSpec.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroFileTransferStatus.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroFilterAlgor.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroMetadata.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroMimeType.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProduct.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProductPage.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProductType.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQuery.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryCriteria.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryFilter.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryResult.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroReference.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroTypeHandler.avsc
oodt/branches/avro_rpc/filemgr/src/main/avro/types/protocol.avdl
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/AvroFileManagerClient.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/AvroFileManagerServer.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/FileManager.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/FileManagerClient.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/FileManagerClientMain.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/FileManagerServer.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/FileManagerServerMain.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManagerServer.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/rpc/
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/rpc/AvroFileManagerClientFactory.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/rpc/AvroFileManagerServerFactory.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/rpc/FileManagerClientFactory.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/rpc/FileManagerServerFactory.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/rpc/XmlRpcFileManagerClientFactory.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/rpc/XmlRpcFileManagerServerFactory.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/util/AvroTypeFactory.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/util/RpcCommunicationFactory.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/DummyFileManagerClient.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/system/MockFileManagerClient.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/system/TestRpcFileManager.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/system/TestRpcFileManagerClient.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/system/rpc/
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/system/rpc/TestServerClientFactories.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/util/TestAvroTypesFactory.java
oodt/branches/avro_rpc/filemgr/src/test/resources/createProduct/
oodt/branches/avro_rpc/filemgr/src/test/resources/createProduct/test.txt
Modified:
oodt/branches/avro_rpc/CHANGES.txt
oodt/branches/avro_rpc/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java
oodt/branches/avro_rpc/crawler/src/main/java/org/apache/oodt/cas/crawl/action/FilemgrUniquenessChecker.java
oodt/branches/avro_rpc/crawler/src/main/java/org/apache/oodt/cas/crawl/comparator/FilemgrUniquenessCheckComparator.java
oodt/branches/avro_rpc/filemgr/pom.xml
oodt/branches/avro_rpc/filemgr/src/main/bin/filemgr
oodt/branches/avro_rpc/filemgr/src/main/bin/filemgr-client
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/AbstractDeleteProductCliAction.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/DeleteProductByIdCliAction.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/FileManagerCliAction.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetFirstPageCliAction.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetLastPageCliAction.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetNextPageCliAction.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetNumProductsCliAction.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetPrevPageCliAction.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductPercentTransferredCliAction.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/IngestProductCliAction.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/RetrieveFilesCliAction.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/InPlaceDataTransferer.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/LocalDataTransferer.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/RemoteDataTransferer.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/LocalCache.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/StdIngester.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/metadata/ProductMetKeys.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManagerClient.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/CatalogSearch.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/DeleteProduct.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/ExpImpCatalog.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/MetadataBasedProductMover.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/MetadataDumper.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/ProductDumper.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/QueryTool.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/tools/SolrIndexer.java
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/util/XmlRpcStructFactory.java
oodt/branches/avro_rpc/filemgr/src/main/resources/filemgr.properties
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/TestFileManagerCli.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/UseMockClientCmdLineActionStore.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestAddProductTypeCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestDeleteProductByIdCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestDeleteProductByNameCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestDumpMetadataCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestGetCurrentTransferCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestGetCurrentTransfersCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestGetFilePercentTransferredCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestGetFirstPageCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestGetLastPageCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestGetNextPageCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestGetNumProductsCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestGetPrevPageCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestGetProductByIdCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestGetProductByNameCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestGetProductPercentTransferredCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestGetProductTypeByNameCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestHasProductCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestIngestProductCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestLuceneQueryCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/cli/action/TestSqlQueryCliAction.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestCachedIngester.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestLocalCache.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestRmiCache.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/ingest/TestStdIngester.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/metadata/extractors/examples/TestTikaAutoDetectExtractor.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/structs/type/TestTypeHandler.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/tools/TestExpImpCatalog.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/tools/TestMetadataBasedProductMover.java
oodt/branches/avro_rpc/filemgr/src/test/java/org/apache/oodt/cas/filemgr/util/TestXmlRpcStructFactory.java
oodt/branches/avro_rpc/filemgr/src/test/resources/filemgr.properties
oodt/branches/avro_rpc/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/filemgr
oodt/branches/avro_rpc/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/filemgr-client
oodt/branches/avro_rpc/pcs/core/src/main/java/org/apache/oodt/pcs/util/FileManagerUtils.java
oodt/branches/avro_rpc/pge/src/main/java/org/apache/oodt/cas/pge/staging/FileStager.java
oodt/branches/avro_rpc/pge/src/main/java/org/apache/oodt/cas/pge/util/XmlHelper.java
oodt/branches/avro_rpc/pge/src/test/java/org/apache/oodt/cas/pge/staging/TestFileStager.java
oodt/branches/avro_rpc/profile/src/main/java/org/apache/oodt/profile/handlers/cas/CASProfileHandler.java
oodt/branches/avro_rpc/webapp/components/src/main/java/org/apache/oodt/cas/webcomponents/filemgr/FileManagerConn.java
oodt/branches/avro_rpc/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/CASProductHandler.java
oodt/branches/avro_rpc/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DataDeliveryServlet.java
oodt/branches/avro_rpc/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/data/DatasetDeliveryServlet.java
oodt/branches/avro_rpc/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/services/CasProductJaxrsService.java
oodt/branches/avro_rpc/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/jaxrs/servlets/CasProductJaxrsServlet.java
oodt/branches/avro_rpc/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFDatasetServlet.java
oodt/branches/avro_rpc/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rdf/RDFProductServlet.java
oodt/branches/avro_rpc/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductServlet.java
oodt/branches/avro_rpc/webapp/fmprod/src/main/java/org/apache/oodt/cas/product/rss/RSSProductTransferServlet.java
Modified: oodt/branches/avro_rpc/CHANGES.txt
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/CHANGES.txt?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
--- oodt/branches/avro_rpc/CHANGES.txt (original)
+++ oodt/branches/avro_rpc/CHANGES.txt Tue Sep 8 04:25:17 2015
@@ -3,6 +3,9 @@ Apache OODT Change Log
Current Development
+* OODT-858 Integrate Avro RPC with the filemanager module
+ OODT-856 Separate XMLRPC from OODT logic in the filemgr module (Radu Manole,
mattmann, lewismc))
+
* OODT-872 Upgrade Jena dependencies to org.apache.jena 3.0.0 (mattmann,
lewismc)
* OODT-865 Integrate Avro RPC with the crawler module
Modified:
oodt/branches/avro_rpc/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java
(original)
+++
oodt/branches/avro_rpc/app/fmbrowser/src/main/java/org/apache/oodt/cas/filemgr/browser/model/CasDB.java
Tue Sep 8 04:25:17 2015
@@ -22,7 +22,8 @@ import org.apache.oodt.cas.filemgr.struc
import org.apache.oodt.cas.filemgr.structs.ProductType;
import
org.apache.oodt.cas.filemgr.structs.exceptions.RepositoryManagerException;
import org.apache.oodt.cas.filemgr.structs.exceptions.ValidationLayerException;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
+import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
import org.apache.oodt.cas.metadata.Metadata;
import java.net.URL;
@@ -38,7 +39,7 @@ import org.apache.lucene.search.Query;
public class CasDB {
URL filemgrUrl;
- XmlRpcFileManagerClient client;
+ FileManagerClient client;
public Results results;
private static String freeTextBlock = "__FREE__";
@@ -50,7 +51,7 @@ public class CasDB {
public boolean connect(String cas) {
try {
filemgrUrl = new URL(cas);
- client = new XmlRpcFileManagerClient(filemgrUrl);
+ client = RpcCommunicationFactory.createClient(filemgrUrl);
} catch (Exception e) {
filemgrUrl = null;
return false;
Modified:
oodt/branches/avro_rpc/crawler/src/main/java/org/apache/oodt/cas/crawl/action/FilemgrUniquenessChecker.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/crawler/src/main/java/org/apache/oodt/cas/crawl/action/FilemgrUniquenessChecker.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/crawler/src/main/java/org/apache/oodt/cas/crawl/action/FilemgrUniquenessChecker.java
(original)
+++
oodt/branches/avro_rpc/crawler/src/main/java/org/apache/oodt/cas/crawl/action/FilemgrUniquenessChecker.java
Tue Sep 8 04:25:17 2015
@@ -28,7 +28,8 @@ import org.apache.commons.lang.Validate;
//OODT imports
import org.apache.oodt.cas.crawl.structs.exceptions.CrawlerActionException;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
+import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
import org.apache.oodt.cas.metadata.Metadata;
/**
@@ -47,8 +48,7 @@ public class FilemgrUniquenessChecker ex
Validate.notNull(productMetadata.getMetadata(PRODUCT_NAME),
PRODUCT_NAME + " was not found in metadata");
- XmlRpcFileManagerClient fmClient = new XmlRpcFileManagerClient(
- new URL(this.filemgrUrl));
+ FileManagerClient fmClient = RpcCommunicationFactory.createClient(new
URL(this.filemgrUrl));
return
!fmClient.hasProduct(productMetadata.getMetadata(PRODUCT_NAME));
} catch (Exception e) {
throw new CrawlerActionException("Product failed uniqueness check : ["
Modified:
oodt/branches/avro_rpc/crawler/src/main/java/org/apache/oodt/cas/crawl/comparator/FilemgrUniquenessCheckComparator.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/crawler/src/main/java/org/apache/oodt/cas/crawl/comparator/FilemgrUniquenessCheckComparator.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/crawler/src/main/java/org/apache/oodt/cas/crawl/comparator/FilemgrUniquenessCheckComparator.java
(original)
+++
oodt/branches/avro_rpc/crawler/src/main/java/org/apache/oodt/cas/crawl/comparator/FilemgrUniquenessCheckComparator.java
Tue Sep 8 04:25:17 2015
@@ -23,7 +23,7 @@ import java.io.File;
import java.net.URL;
//OODT imports
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
import org.apache.oodt.cas.metadata.exceptions.PreconditionComparatorException;
import org.apache.oodt.cas.metadata.preconditions.PreConditionComparator;
@@ -49,8 +49,7 @@ public class FilemgrUniquenessCheckCompa
protected int performCheck(File product, Boolean compareItem)
throws PreconditionComparatorException {
try {
- boolean returnVal = new XmlRpcFileManagerClient(new URL(
- this.filemgrUrl)).hasProduct(product.getName());
+ boolean returnVal = RpcCommunicationFactory.createClient(new
URL(this.filemgrUrl)).hasProduct(product.getName());
return new Boolean(returnVal).compareTo(compareItem);
} catch (Exception e) {
throw new PreconditionComparatorException(
Modified: oodt/branches/avro_rpc/filemgr/pom.xml
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/pom.xml?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
--- oodt/branches/avro_rpc/filemgr/pom.xml (original)
+++ oodt/branches/avro_rpc/filemgr/pom.xml Tue Sep 8 04:25:17 2015
@@ -57,14 +57,67 @@
<includes>
<include>**/*</include>
</includes>
- <!--targetPath>${project.basedir}/target/classes/</targetPath-->
</testResource>
</testResources>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro-maven-plugin</artifactId>
+ <version>1.7.7</version>
+ <configuration>
+ <stringType>String</stringType>
+ <detail>true</detail>
+ </configuration>
+ <executions>
+ <execution>
+ <id>schemas</id>
+ <configuration>
+ <imports>
+
<import>${basedir}/src/main/avro/types/AvroMimeType.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroReference.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroExtractorSpec.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroMetadata.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroTypeHandler.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroProductType.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroProduct.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroFileTransferStatus.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroQueryCriteria.avsc</import>
+ <import>${basedir}/src/main/avro/types/AvroQuery.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroProductPage.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroElement.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroQueryResult.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroFilterAlgor.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroQueryFilter.avsc</import>
+
<import>${basedir}/src/main/avro/types/AvroComplexQuery.avsc</import>
+ </imports>
+ </configuration>
+ <goals>
+ <goal>schema</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>protocol</id>
+ <configuration>
+ <imports>
+ <import>${basedir}/src/main/avro/types</import>
+ </imports>
+ </configuration>
+ <goals>
+ <goal>idl-protocol</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<configuration>
+ <forkCount>0</forkCount>
<!--forkMode>pertest</forkMode-->
<forkMode>none</forkMode> <!-- so we can DEBUG -->
<argLine>-enableassertions</argLine>
@@ -80,6 +133,7 @@
<includes>
<include>**/*Test*.java</include>
</includes>
+
</configuration>
</plugin>
<plugin>
@@ -92,7 +146,7 @@
</descriptors>
<archive>
<manifest>
-
<mainClass>org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient</mainClass>
+
<mainClass>org.apache.oodt.cas.filemgr.system.AvroRpcFileManagerClient</mainClass>
</manifest>
</archive>
</configuration>
@@ -151,9 +205,19 @@
</repositories>
<dependencies>
<dependency>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro</artifactId>
+ <version>1.7.7</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro-ipc</artifactId>
+ <version>1.7.7</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
- <version>1.7</version>
+ <version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.oodt</groupId>
@@ -305,5 +369,10 @@
<version>1.3</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-compress</artifactId>
+ <version>1.9</version>
+ </dependency>
</dependencies>
</project>
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroComplexQuery.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroComplexQuery.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroComplexQuery.avsc
(added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroComplexQuery.avsc
Tue Sep 8 04:25:17 2015
@@ -0,0 +1,15 @@
+{
+ "type":"record",
+ "name":"AvroComplexQuery",
+ "default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "imports":["AvroQueryCriteria.avsc","AvroQueryFilter.avsc"],
+ "fields":[
+
{"name":"criteria","type":["null",{"type":"array","items":"AvroQueryCriteria"}]},
+
{"name":"reducedProductTypeNames","type":["null",{"type":"array","items":"string"}]},
+
{"name":"reducedMetadata","type":["null",{"type":"array","items":"string"}]},
+ {"name":"queryFilter","type":["null","AvroQueryFilter"]},
+ {"name":"sortByMetKey","type":["null","string"]},
+ {"name":"toStringResultFormat","type":["null","string"]}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroElement.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroElement.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroElement.avsc (added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroElement.avsc Tue Sep
8 04:25:17 2015
@@ -0,0 +1,13 @@
+{
+ "type":"record",
+ "name":"AvroElement",
+ "default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "imports":[],
+ "fields":[
+ {"name":"elementId","type":["null","string"]},
+ {"name":"elementName","type":["null","string"]},
+ {"name":"dcElement","type":["null","string"]},
+ {"name":"description","type":["null","string"]}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroExtractorSpec.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroExtractorSpec.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroExtractorSpec.avsc
(added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroExtractorSpec.avsc
Tue Sep 8 04:25:17 2015
@@ -0,0 +1,11 @@
+{
+ "type":"record",
+ "name":"AvroExtractorSpec",
+ "default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "imports":[],
+ "fields":[
+ {"name":"className","type":["null","string"]},
+ {"name":"configuration","type":[{"type":"map","values":"string"},"null"]}
+ ]
+}
\ No newline at end of file
Added:
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroFileTransferStatus.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroFileTransferStatus.avsc?rev=1701724&view=auto
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroFileTransferStatus.avsc
(added)
+++
oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroFileTransferStatus.avsc
Tue Sep 8 04:25:17 2015
@@ -0,0 +1,12 @@
+{
+ "type":"record",
+ "name":"AvroFileTransferStatus",
+ "default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "imports":["AvroProduct.avsc","AvroReference.avsc"],
+ "fields":[
+ {"name":"fileRef","type":["null","AvroReference"]},
+ {"name": "bytesTransferred", "type":"long","default":0},
+ {"name":"parentProduct","type":["null","AvroProduct"]}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroFilterAlgor.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroFilterAlgor.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroFilterAlgor.avsc
(added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroFilterAlgor.avsc Tue
Sep 8 04:25:17 2015
@@ -0,0 +1,11 @@
+{
+ "type":"record",
+ "name":"AvroFilterAlgor",
+ "default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "imports":[],
+ "fields":[
+ {"name":"className","type":["null","string"]},
+ {"name":"epsilon","type":"long","default":0}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroMetadata.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroMetadata.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroMetadata.avsc (added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroMetadata.avsc Tue
Sep 8 04:25:17 2015
@@ -0,0 +1,8 @@
+{
+ "type":"record",
+ "name":"AvroMetadata",
+ "namespace": "org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "fields":[
+
{"name":"tableMetadata","type":[{"type":"map","values":{"type":"array","items":"string"}},"null"]}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroMimeType.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroMimeType.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroMimeType.avsc (added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroMimeType.avsc Tue
Sep 8 04:25:17 2015
@@ -0,0 +1,8 @@
+{
+ "type":"record",
+ "name":"AvroMimeType",
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "fields":[
+ {"name":"typeName","type":["null","string"]}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProduct.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProduct.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProduct.avsc (added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProduct.avsc Tue Sep
8 04:25:17 2015
@@ -0,0 +1,16 @@
+{
+ "type":"record",
+ "name":"AvroProduct",
+ "default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "imports":["AvroReference.avsc","AvroProductType.avsc"],
+ "fields":[
+ {"name":"productId","type":["null","string"]},
+ {"name":"productName","type":["null","string"]},
+ {"name":"productType","type":["null","AvroProductType"]},
+ {"name":"productStructure","type":["null","string"]},
+
{"name":"references","type":[{"type":"array","items":"AvroReference"},"null"]},
+ {"name":"transferStatus","type":["null","string"]},
+ {"name":"rootRef","type":["null","AvroReference"]}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProductPage.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProductPage.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProductPage.avsc
(added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProductPage.avsc Tue
Sep 8 04:25:17 2015
@@ -0,0 +1,14 @@
+{
+ "type":"record",
+ "name":"AvroProductPage",
+ "default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "imports":[],
+ "fields":[
+ {"name":"pageNum","type":"int","default":-1},
+ {"name":"totalPages","type":"int","default":-1},
+ {"name":"pageSize","type":"int","default":-1},
+
{"name":"pageProducts","type":["null",{"type":"array","items":"AvroProduct"}]},
+ {"name":"numOfHits","type":["null","long"]}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProductType.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProductType.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProductType.avsc
(added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroProductType.avsc Tue
Sep 8 04:25:17 2015
@@ -0,0 +1,17 @@
+{
+ "type":"record",
+ "name":"AvroProductType",
+ "default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+
"imports":["AvroExtractorSpec.avsc","AvroTypeHandler.avsc","AvroMetadata.avsc"],
+ "fields":[
+ {"name":"productTypeId","type":["null","string"]},
+ {"name":"name","type":["null","string"]},
+ {"name":"description","type":["null","string"]},
+ {"name":"productRepositoryPath","type":["null","string"]},
+ {"name":"versioner","type":["null","string"]},
+ {"name":"typeMetadata","type":["null","AvroMetadata"]},
+ {"name":"extractors","type":[{ "type": "array", "items":
"AvroExtractorSpec" },"null"]},
+ {"name":"handlers","type":[{ "type": "array", "items": "AvroTypeHandler"
},"null"]}
+ ]
+}
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQuery.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQuery.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQuery.avsc (added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQuery.avsc Tue Sep
8 04:25:17 2015
@@ -0,0 +1,10 @@
+{
+ "type":"record",
+ "name":"AvroQuery",
+ "default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "imports":["AvroQueryCriteria.avsc"],
+ "fields":[
+
{"name":"criteria","type":["null",{"type":"array","items":"AvroQueryCriteria"}]}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryCriteria.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryCriteria.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryCriteria.avsc
(added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryCriteria.avsc
Tue Sep 8 04:25:17 2015
@@ -0,0 +1,17 @@
+{
+ "type":"record",
+ "name":"AvroQueryCriteria",
+ "default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "imports":[],
+ "fields":[
+ {"name":"className","type":["null","string"]},
+ {"name":"elementName","type":["null","string"]},
+ {"name":"elementValue","type":["null","string"]},
+ {"name":"elementStartValue","type":["null","string"]},
+ {"name":"elementEndValue","type":["null","string"]},
+ {"name":"inclusive","type":["null","boolean"]},
+ {"name":"operator","type":["null","int"]},
+
{"name":"terms","type":["null",{"type":"array","items":"AvroQueryCriteria"}]}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryFilter.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryFilter.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryFilter.avsc
(added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryFilter.avsc Tue
Sep 8 04:25:17 2015
@@ -0,0 +1,13 @@
+{
+ "type":"record",
+ "name":"AvroQueryFilter",
+ "default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "imports":["AvroFilterAlgor.avcs"],
+ "fields":[
+ {"name":"startDateTimeMetKey","type":["null","string"]},
+ {"name":"endDateTimeMetKey","type":["null","string"]},
+ {"name":"priorityMetKey","type":["null","string"]},
+ {"name":"filterAlgor","type":["null","AvroFilterAlgor"]}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryResult.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryResult.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryResult.avsc
(added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroQueryResult.avsc Tue
Sep 8 04:25:17 2015
@@ -0,0 +1,12 @@
+{
+ "type":"record",
+ "name":"AvroQueryResult",
+ "default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "imports":[],
+ "fields":[
+ {"name":"product","type":["null","AvroProduct"]},
+ {"name":"metadata","type":["null","AvroMetadata"]},
+ {"name":"toStringFormat","type":["null","string"]}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroReference.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroReference.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroReference.avsc
(added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroReference.avsc Tue
Sep 8 04:25:17 2015
@@ -0,0 +1,13 @@
+{
+ "type":"record",
+ "name":"AvroReference",
+ "default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "imports":["AvroMimeType.avsc"],
+ "fields":[
+ {"name":"origReference","type":["null","string"]},
+ {"name":"dataStoreReference","type":["null","string"]},
+ {"name":"fileSize","type":"long","default":0},
+ {"name":"mimeTypeName","type":["string","null"]}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroTypeHandler.avsc
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroTypeHandler.avsc?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroTypeHandler.avsc
(added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/AvroTypeHandler.avsc Tue
Sep 8 04:25:17 2015
@@ -0,0 +1,10 @@
+{
+ "type":"record",
+ "name":"AvroTypeHandler","default":null,
+ "namespace":"org.apache.oodt.cas.filemgr.structs.avrotypes",
+ "imports":[],
+ "fields":[
+ {"name":"className","type":"string"},
+ {"name":"elementName","type":"string"}
+ ]
+}
\ No newline at end of file
Added: oodt/branches/avro_rpc/filemgr/src/main/avro/types/protocol.avdl
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/avro/types/protocol.avdl?rev=1701724&view=auto
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/avro/types/protocol.avdl (added)
+++ oodt/branches/avro_rpc/filemgr/src/main/avro/types/protocol.avdl Tue Sep 8
04:25:17 2015
@@ -0,0 +1,120 @@
+@namespace("org.apache.oodt.cas.filemgr.structs.avrotypes")
+protocol AvroFileManager {
+import schema "AvroMimeType.avsc";
+import schema "AvroReference.avsc";
+import schema "AvroTypeHandler.avsc";
+import schema "AvroExtractorSpec.avsc";
+import schema "AvroMetadata.avsc";
+import schema "AvroProductType.avsc";
+import schema "AvroProduct.avsc";
+import schema "AvroFileTransferStatus.avsc";
+import schema "AvroProductPage.avsc";
+import schema "AvroQueryCriteria.avsc";
+import schema "AvroQuery.avsc";
+import schema "AvroElement.avsc";
+import schema "AvroQueryResult.avsc";
+import schema "AvroFilterAlgor.avsc";
+import schema "AvroQueryFilter.avsc";
+import schema "AvroComplexQuery.avsc";
+
+ boolean isAlive();
+
+ boolean refreshConfigAndPolicy();
+
+ boolean transferringProduct(AvroProduct p);
+
+ AvroFileTransferStatus getCurrentFileTransfer();
+
+ array<AvroFileTransferStatus> getCurrentFileTransfers();
+
+ double getProductPctTransferred(AvroProduct product);
+
+ double getRefPctTransferred(AvroReference reference);
+
+ boolean removeProductTransferStatus(AvroProduct product);
+
+ boolean isTransferComplete(AvroProduct product);
+
+ AvroProductPage pagedQuery(AvroQuery query, AvroProductType type, int
pageNum);
+
+ AvroProductPage getFirstPage(AvroProductType type);
+
+ AvroProductPage getLastPage(AvroProductType type);
+
+ AvroProductPage getNextPage(AvroProductType type ,AvroProductPage
currPage);
+
+ AvroProductPage getPrevPage(AvroProductType type,AvroProductPage currPage);
+
+ boolean setProductTransferStatus(AvroProduct product);
+
+ int getNumProducts(AvroProductType type);
+
+ array<AvroProduct> getTopNProductsByProductType(int n,AvroProductType
type);
+
+ array<AvroProduct> getTopNProducts(int n);
+
+ boolean hasProduct(string productName);
+
+ AvroMetadata getMetadata(AvroProduct product);
+
+ AvroMetadata getReducedMetadata(AvroProduct product, array<string>
elements);
+
+ array<AvroProductType> getProductTypes();
+
+ array<AvroReference> getProductReferences(AvroProduct product);
+
+ AvroProduct getProductById(string productId);
+
+ AvroProduct getProductByName(string productName);
+
+ array<AvroProduct> getProductsByProductType(AvroProductType type);
+
+ array<AvroElement> getElementsByProductType(AvroProductType type);
+
+ AvroElement getElementById(string elementId);
+
+ AvroElement getElementByName(string elementName);
+
+ array<AvroQueryResult> complexQuery(AvroComplexQuery complexQuery);
+
+ array<AvroProduct> query(AvroQuery query,AvroProductType type);
+
+ AvroProductType getProductTypeByName(string productTypeName);
+
+ AvroProductType getProductTypeById(string productTypeId);
+
+ AvroProductType getProductTypeById(string productTypeId);
+
+ boolean updateMetadata(AvroProduct product,AvroMetadata met);
+
+ string addProductType(AvroProductType type);
+
+ string catalogProduct(AvroProduct product);
+
+ boolean addMetadata(AvroProduct product, AvroMetadata met);
+
+ boolean addProductReferences(AvroProduct product);
+
+ string ingestProduct(AvroProduct p,AvroMetadata m, boolean clientTransfer);
+
+ string ingestProduct(AvroProduct p,AvroMetadata m, boolean clientTransfer);
+
+ bytes retrieveFile(string filePath, int offset, int numBytes);
+
+ boolean transferFile(string filePath, bytes fileData, int offset,int
numBytes);
+
+ boolean moveProduct(AvroProduct p, string newPath);
+
+ boolean removeFile(string filePath);
+
+ boolean modifyProduct(AvroProduct p);
+
+ boolean removeProduct(AvroProduct p);
+
+ AvroMetadata getCatalogValues(AvroMetadata m,AvroProductType productType);
+
+ AvroMetadata getOrigValues(AvroMetadata m,AvroProductType productType);
+
+ AvroQuery getCatalogQuery(AvroQuery query,AvroProductType productType);
+
+}
\ No newline at end of file
Modified: oodt/branches/avro_rpc/filemgr/src/main/bin/filemgr
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/bin/filemgr?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/bin/filemgr (original)
+++ oodt/branches/avro_rpc/filemgr/src/main/bin/filemgr Tue Sep 8 04:25:17 2015
@@ -60,8 +60,8 @@ case "$1" in
-cp ${LIB_DEPS} \
-Djava.util.logging.config.file=${CAS_FILEMGR_HOME}/etc/logging.properties \
-Dorg.apache.oodt.cas.filemgr.properties=${CAS_FILEMGR_PROPS} \
- org.apache.oodt.cas.filemgr.system.XmlRpcFileManager \
- --portNum $SERVER_PORT &
+ org.apache.oodt.cas.filemgr.system.FileManagerServerMain \
+ --portNum $SERVER_PORT &
echo $! > ${RUN_HOME}/cas.filemgr.pid
echo "OK"
sleep 5
Modified: oodt/branches/avro_rpc/filemgr/src/main/bin/filemgr-client
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/bin/filemgr-client?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
--- oodt/branches/avro_rpc/filemgr/src/main/bin/filemgr-client (original)
+++ oodt/branches/avro_rpc/filemgr/src/main/bin/filemgr-client Tue Sep 8
04:25:17 2015
@@ -34,4 +34,4 @@ $JAVA_HOME/bin/java \
-Djava.util.logging.config.file=../etc/logging.properties \
-Dorg.apache.oodt.cas.cli.action.spring.config=../policy/cmd-line-actions.xml \
-Dorg.apache.oodt.cas.cli.option.spring.config=../policy/cmd-line-options.xml \
- org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient $*
+ org.apache.oodt.cas.filemgr.system.FileManagerClientMain $*
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/AbstractDeleteProductCliAction.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/AbstractDeleteProductCliAction.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/AbstractDeleteProductCliAction.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/AbstractDeleteProductCliAction.java
Tue Sep 8 04:25:17 2015
@@ -25,7 +25,7 @@ import java.util.List;
import org.apache.oodt.cas.cli.exception.CmdLineActionException;
import org.apache.oodt.cas.filemgr.structs.Product;
import org.apache.oodt.cas.filemgr.structs.Reference;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
/**
* A abstract {@link CmdLineAction} for deleting {@link Product}s.
@@ -40,7 +40,7 @@ public abstract class AbstractDeleteProd
throws CmdLineActionException {
Product p = null;
try {
- XmlRpcFileManagerClient client = getClient();
+ FileManagerClient client = getClient();
p = getProductToDelete();
List<Reference> refs = client.getProductReferences(p);
if (refs == null) {
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/DeleteProductByIdCliAction.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/DeleteProductByIdCliAction.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/DeleteProductByIdCliAction.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/DeleteProductByIdCliAction.java
Tue Sep 8 04:25:17 2015
@@ -21,7 +21,7 @@ import org.apache.commons.lang.Validate;
//OODT imports
import org.apache.oodt.cas.filemgr.structs.Product;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
/**
* A {@link CmdLineAction} which deletes a {@link Product} by ID.
@@ -36,7 +36,7 @@ public class DeleteProductByIdCliAction
public Product getProductToDelete() throws Exception {
Validate.notNull(productId, "Must specify productId");
- XmlRpcFileManagerClient client = getClient();
+ FileManagerClient client = getClient();
Product p = client.getProductById(productId);
if (p == null) {
throw new Exception("FileManager returned null for product '"
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/FileManagerCliAction.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/FileManagerCliAction.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/FileManagerCliAction.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/FileManagerCliAction.java
Tue Sep 8 04:25:17 2015
@@ -26,7 +26,8 @@ import org.apache.commons.lang.Validate;
//OODT imports
import org.apache.oodt.cas.cli.action.CmdLineAction;
import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
+import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
/**
* Base {@link CmdLineAction} for File Manager.
@@ -35,24 +36,24 @@ import org.apache.oodt.cas.filemgr.syste
*/
public abstract class FileManagerCliAction extends CmdLineAction {
- private XmlRpcFileManagerClient client;
+ private FileManagerClient client;
public String getUrl() {
return System.getProperty("org.apache.oodt.cas.filemgr.url");
}
- protected XmlRpcFileManagerClient getClient()
+ protected FileManagerClient getClient()
throws MalformedURLException, ConnectionException {
Validate.notNull(getUrl(), "Must specify url");
if (client != null) {
return client;
} else {
- return new XmlRpcFileManagerClient(new URL(getUrl()), false);
+ return RpcCommunicationFactory.createClient(new URL(getUrl()), false);
}
}
- public void setClient(XmlRpcFileManagerClient client) {
+ public void setClient(FileManagerClient client) {
this.client = client;
}
}
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetFirstPageCliAction.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetFirstPageCliAction.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetFirstPageCliAction.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetFirstPageCliAction.java
Tue Sep 8 04:25:17 2015
@@ -24,7 +24,7 @@ import org.apache.oodt.cas.cli.exception
import org.apache.oodt.cas.filemgr.structs.Product;
import org.apache.oodt.cas.filemgr.structs.ProductPage;
import org.apache.oodt.cas.filemgr.structs.ProductType;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
/**
* A {@link CmdLineAction} which gets the first page of {@link Product}s of a
@@ -42,7 +42,7 @@ public class GetFirstPageCliAction exten
try {
Validate.notNull(productTypeName, "Must specify productTypeName");
- XmlRpcFileManagerClient client = getClient();
+ FileManagerClient client = getClient();
ProductType type = client.getProductTypeByName(productTypeName);
if (type == null) {
throw new Exception("FileManager returned null ProductType");
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetLastPageCliAction.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetLastPageCliAction.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetLastPageCliAction.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetLastPageCliAction.java
Tue Sep 8 04:25:17 2015
@@ -24,7 +24,7 @@ import org.apache.oodt.cas.cli.exception
import org.apache.oodt.cas.filemgr.structs.Product;
import org.apache.oodt.cas.filemgr.structs.ProductPage;
import org.apache.oodt.cas.filemgr.structs.ProductType;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
/**
* A {@link CmdLineAction} which gets the last page of {@link Product}s of a
@@ -42,7 +42,7 @@ public class GetLastPageCliAction extend
try {
Validate.notNull(productTypeName, "Must specify productTypeName");
- XmlRpcFileManagerClient client = getClient();
+ FileManagerClient client = getClient();
ProductType type = client.getProductTypeByName(productTypeName);
if (type == null) {
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetNextPageCliAction.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetNextPageCliAction.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetNextPageCliAction.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetNextPageCliAction.java
Tue Sep 8 04:25:17 2015
@@ -24,7 +24,7 @@ import org.apache.oodt.cas.cli.exception
import org.apache.oodt.cas.filemgr.structs.Product;
import org.apache.oodt.cas.filemgr.structs.ProductPage;
import org.apache.oodt.cas.filemgr.structs.ProductType;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
/**
* A {@link CmdLineAction} which gets the next page of {@link Product}s for a
@@ -45,7 +45,7 @@ public class GetNextPageCliAction extend
Validate.notNull(productTypeName, "Must specify productTypeName");
Validate.isTrue(currentPageNum != -1, "Must specify currentPageNum");
- XmlRpcFileManagerClient client = getClient();
+ FileManagerClient client = getClient();
ProductType type = client.getProductTypeByName(productTypeName);
if (type == null) {
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetNumProductsCliAction.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetNumProductsCliAction.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetNumProductsCliAction.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetNumProductsCliAction.java
Tue Sep 8 04:25:17 2015
@@ -22,7 +22,7 @@ import org.apache.commons.lang.Validate;
//OODT imports
import org.apache.oodt.cas.cli.exception.CmdLineActionException;
import org.apache.oodt.cas.filemgr.structs.ProductType;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
/**
* A {@link CmdLineAction} which gets number of {@link Product}s of a given
@@ -40,7 +40,7 @@ public class GetNumProductsCliAction ext
try {
Validate.notNull(productTypeName, "Must specify productTypeName");
- XmlRpcFileManagerClient client = getClient();
+ FileManagerClient client = getClient();
ProductType pt = client.getProductTypeByName(productTypeName);
if (pt == null) {
throw new Exception("FileManager returned null ProductType");
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetPrevPageCliAction.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetPrevPageCliAction.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetPrevPageCliAction.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetPrevPageCliAction.java
Tue Sep 8 04:25:17 2015
@@ -24,7 +24,7 @@ import org.apache.oodt.cas.cli.exception
import org.apache.oodt.cas.filemgr.structs.Product;
import org.apache.oodt.cas.filemgr.structs.ProductPage;
import org.apache.oodt.cas.filemgr.structs.ProductType;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
/**
* A {@link CmdLineAction} which gets the previous page of {@link Product}s for
@@ -44,7 +44,7 @@ public class GetPrevPageCliAction extend
Validate.notNull(productTypeName, "Must specify productTypeName");
Validate.notNull(currentPageNum, "Must specify currentPageNum");
- XmlRpcFileManagerClient client = getClient();
+ FileManagerClient client = getClient();
ProductType type = client.getProductTypeByName(productTypeName);
if (type == null) {
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductPercentTransferredCliAction.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductPercentTransferredCliAction.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductPercentTransferredCliAction.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/GetProductPercentTransferredCliAction.java
Tue Sep 8 04:25:17 2015
@@ -23,7 +23,7 @@ import org.apache.commons.lang.Validate;
import org.apache.oodt.cas.cli.exception.CmdLineActionException;
import org.apache.oodt.cas.filemgr.structs.Product;
import org.apache.oodt.cas.filemgr.structs.ProductType;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
/**
* A {@link CmdLineAction} which get a {@link Product}'s data file transfers
@@ -43,7 +43,7 @@ public class GetProductPercentTransferre
Validate.notNull(productId, "Must specify productid");
Validate.notNull(productTypeName, "Must specify productTypeName");
- XmlRpcFileManagerClient client = getClient();
+ FileManagerClient client = getClient();
Product product = new Product();
// TODO(bfoster): Not sure why ProductType is needed here.
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/IngestProductCliAction.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/IngestProductCliAction.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/IngestProductCliAction.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/IngestProductCliAction.java
Tue Sep 8 04:25:17 2015
@@ -35,7 +35,7 @@ import org.apache.commons.lang.Validate;
import org.apache.oodt.cas.cli.exception.CmdLineActionException;
import org.apache.oodt.cas.filemgr.structs.Product;
import org.apache.oodt.cas.filemgr.structs.ProductType;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
import org.apache.oodt.cas.metadata.SerializableMetadata;
//Google imports
@@ -65,7 +65,7 @@ public class IngestProductCliAction exte
Validate.notNull(metadataFile, "Must specify metadataFile");
Validate.notNull(references, "Must specify references");
- XmlRpcFileManagerClient client = getClient();
+ FileManagerClient client = getClient();
ProductType pt = client.getProductTypeByName(productTypeName);
if (pt == null) {
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/RetrieveFilesCliAction.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/RetrieveFilesCliAction.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/RetrieveFilesCliAction.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/cli/action/RetrieveFilesCliAction.java
Tue Sep 8 04:25:17 2015
@@ -24,7 +24,7 @@ import org.apache.oodt.cas.cli.exception
import org.apache.oodt.cas.filemgr.datatransfer.DataTransfer;
import org.apache.oodt.cas.filemgr.datatransfer.DataTransferFactory;
import org.apache.oodt.cas.filemgr.structs.Product;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
/**
* Retrieves files for a given {@link Product}.
@@ -42,7 +42,7 @@ public class RetrieveFilesCliAction exte
public void execute(ActionMessagePrinter printer)
throws CmdLineActionException {
try {
- XmlRpcFileManagerClient fmClient = getClient();
+ FileManagerClient fmClient = getClient();
dt.setFileManagerUrl(fmClient.getFileManagerUrl());
Product product = null;
if (productId != null) {
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/InPlaceDataTransferer.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/InPlaceDataTransferer.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/InPlaceDataTransferer.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/InPlaceDataTransferer.java
Tue Sep 8 04:25:17 2015
@@ -20,7 +20,8 @@ package org.apache.oodt.cas.filemgr.data
import org.apache.oodt.cas.filemgr.structs.Product;
import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
import org.apache.oodt.cas.filemgr.structs.exceptions.DataTransferException;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
+import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
//JDK imports
import java.io.File;
@@ -40,13 +41,13 @@ public class InPlaceDataTransferer imple
private static final Logger LOG =
Logger.getLogger(InPlaceDataTransferer.class.getName());
- private XmlRpcFileManagerClient client = null;
+ private FileManagerClient client = null;
public InPlaceDataTransferer() {}
public void setFileManagerUrl(URL url) {
try {
- client = new XmlRpcFileManagerClient(url);
+ client = RpcCommunicationFactory.createClient(url);
LOG.log(Level.INFO, "In Place Data Transfer to: [" +
client.getFileManagerUrl().toString()
+ "] enabled");
} catch (ConnectionException e) {
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/LocalDataTransferer.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/LocalDataTransferer.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/LocalDataTransferer.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/LocalDataTransferer.java
Tue Sep 8 04:25:17 2015
@@ -25,8 +25,9 @@ import org.apache.oodt.cas.filemgr.struc
import org.apache.oodt.cas.filemgr.structs.Reference;
import org.apache.oodt.cas.filemgr.structs.exceptions.DataTransferException;
import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
+import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
import org.apache.oodt.cas.filemgr.versioning.VersioningUtils;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
import org.apache.tika.mime.MimeTypeException;
import org.apache.tika.mime.MimeTypes;
import org.apache.tika.mime.MimeTypesFactory;
@@ -63,7 +64,7 @@ public class LocalDataTransferer impleme
.getName());
/* file manager client */
- private XmlRpcFileManagerClient client = null;
+ private FileManagerClient client = null;
/**
* <p>
@@ -82,7 +83,7 @@ public class LocalDataTransferer impleme
*/
public void setFileManagerUrl(URL url) {
try {
- client = new XmlRpcFileManagerClient(url);
+ client = RpcCommunicationFactory.createClient(url);
LOG.log(Level.INFO, "Local Data Transfer to: ["
+ client.getFileManagerUrl().toString() + "] enabled");
} catch (ConnectionException e) {
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/RemoteDataTransferer.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/RemoteDataTransferer.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/RemoteDataTransferer.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/datatransfer/RemoteDataTransferer.java
Tue Sep 8 04:25:17 2015
@@ -22,7 +22,8 @@ import org.apache.oodt.cas.filemgr.struc
import org.apache.oodt.cas.filemgr.structs.Reference;
import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
import org.apache.oodt.cas.filemgr.structs.exceptions.DataTransferException;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
+import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
//JDK imports
@@ -63,7 +64,7 @@ public class RemoteDataTransferer implem
private int chunkSize = 1024;
/* our file manager client */
- private XmlRpcFileManagerClient client = null;
+ private FileManagerClient client = null;
/* our log stream */
private static final Logger LOG = Logger
@@ -85,7 +86,7 @@ public class RemoteDataTransferer implem
*/
public void setFileManagerUrl(URL url) {
try {
- client = new XmlRpcFileManagerClient(url);
+ client = RpcCommunicationFactory.createClient(url);
this.fileManagerUrl = url;
LOG.log(Level.INFO, "Remote Data Transfer to: ["
+ client.getFileManagerUrl().toString() + "] enabled");
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/LocalCache.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/LocalCache.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/LocalCache.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/LocalCache.java
Tue Sep 8 04:25:17 2015
@@ -24,7 +24,8 @@ import org.apache.oodt.cas.filemgr.struc
import org.apache.oodt.cas.filemgr.structs.TermQueryCriteria;
import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
import org.apache.oodt.cas.filemgr.structs.exceptions.CacheException;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
+import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
//JDK imports
import java.net.URL;
@@ -59,7 +60,7 @@ public class LocalCache implements Cache
private String endOfQuery;
- private XmlRpcFileManagerClient fm;
+ private FileManagerClient fm;
private static final Logger LOG = Logger.getLogger(LocalCache.class
.getName());
@@ -171,7 +172,7 @@ public class LocalCache implements Cache
*/
public void setFileManager(URL fmUrl) {
try {
- this.fm = new XmlRpcFileManagerClient(fmUrl);
+ this.fm = RpcCommunicationFactory.createClient(fmUrl);
} catch (ConnectionException e) {
LOG.log(Level.WARNING,
"Exception setting file manager connection to: [" + fmUrl
@@ -205,7 +206,7 @@ public class LocalCache implements Cache
}
/**
- * Performs a {@link XmlRpcFileManagerClient#hasProduct(String)} check
+ * Performs a {@link FileManagerClient#hasProduct(String)} check
* against a live File Manager, bypassing the {@link Cache}.
*
* @param uniqueElementName
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/StdIngester.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/StdIngester.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/StdIngester.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/StdIngester.java
Tue Sep 8 04:25:17 2015
@@ -25,7 +25,8 @@ import org.apache.oodt.cas.filemgr.struc
import org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException;
import org.apache.oodt.cas.filemgr.structs.exceptions.IngestException;
import
org.apache.oodt.cas.filemgr.structs.exceptions.RepositoryManagerException;
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
+import org.apache.oodt.cas.filemgr.util.RpcCommunicationFactory;
import org.apache.oodt.cas.filemgr.util.GenericFileManagerObjectFactory;
import org.apache.oodt.cas.filemgr.versioning.VersioningUtils;
import org.apache.oodt.cas.metadata.MetExtractor;
@@ -78,7 +79,7 @@ public class StdIngester implements Inge
.getName());
/* our file manager client */
- private XmlRpcFileManagerClient fmClient = null;
+ private FileManagerClient fmClient = null;
/* client transfer service factory */
private String clientTransferServiceFactory = null;
@@ -253,7 +254,8 @@ public class StdIngester implements Inge
private void setFileManager(URL url) {
try {
- fmClient = new XmlRpcFileManagerClient(url);
+ fmClient = RpcCommunicationFactory.createClient(url);
+
LOG.log(Level.INFO, "StdIngester: connected to file manager: ["
+ url + "]");
// instantiate the client transfer object
Modified:
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/metadata/ProductMetKeys.java
URL:
http://svn.apache.org/viewvc/oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/metadata/ProductMetKeys.java?rev=1701724&r1=1701723&r2=1701724&view=diff
==============================================================================
---
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/metadata/ProductMetKeys.java
(original)
+++
oodt/branches/avro_rpc/filemgr/src/main/java/org/apache/oodt/cas/filemgr/metadata/ProductMetKeys.java
Tue Sep 8 04:25:17 2015
@@ -18,14 +18,14 @@
package org.apache.oodt.cas.filemgr.metadata;
//OODT imports
-import org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient;
+import org.apache.oodt.cas.filemgr.system.FileManagerClient;
/**
*
* Met key field names used to augment {@link Product} {@link Metadata} in
- * {@link
XmlRpcFileManagerClient#getMetadata(org.apache.oodt.cas.filemgr.structs.Product)}
+ * {@link
FileManagerClient#getMetadata(org.apache.oodt.cas.filemgr.structs.Product)}
* and in
- * {@link
XmlRpcFileManagerClient#getReducedMetadata(org.apache.oodt.cas.filemgr.structs.Product,
java.util.List)}
+ * {@link
FileManagerClient#getReducedMetadata(org.apache.oodt.cas.filemgr.structs.Product,
java.util.List)}
* .
*
* @see http://issues.apache.org/jira/browse/OODT-72