macressler / alfresco-bulk-filesystem-import

Automatically exported from code.google.com/p/alfresco-bulk-filesystem-import
GNU Lesser General Public License v3.0
1 stars 0 forks source link

Import Type is Streaming even when source files are in contentstore #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Place files (content and metadata XML files) in subdir of contentstore (in 
this case /mnt/alfresco-SAN/contentstore/20121207143157
2. Initiate Bulk Import manually with the following parameters
Source Directory: /mnt/alfresco-SAN/contentstore/20121207143157
Target Space:    /Company Home/JudicialCM/JPOD
3.

What is the expected output? What do you see instead?
Expect status to indicate "Import Type" is "In Place".  Instead, it is 
"Streaming"

What version of the product are you using? On what operating system?
alfresco-bulk-filesystem-import-1.1-ALF40.amp

Alfresco Enterprise v4.0.2 (.11 55)

RHEL:
$ uname -a
Linux DMStest10.judicial.local 2.6.32-279.9.1.el6.x86_64 #1 SMP Fri Aug 31 
09:04:24 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/*release
Red Hat Enterprise Linux Server release 6.3 (Santiago)

Please provide any additional information below.

A snippet from alfresco-global.properties:
dir.root=/mnt/alfresco-SAN
dir.auditcontentstore=/mnt/alfresco-SAN/audit.contentstore
dir.contentstore.deleted=/mnt/alfresco-SAN/contentstore.deleted
dir.contentstore=/mnt/alfresco-SAN/contentstore

Alfresco itself is installed in /opt/alfresco-4.0.2.11, but since the content 
store is not there the dir.root reflects the actual content store location (on 
the /mnt/alfresco-SAN)

Original issue reported on code.google.com by ehar...@ziaconsulting.com on 7 Dec 2012 at 11:15

GoogleCodeExporter commented 9 years ago
It should be noted that InPlace imports were working as expected before 
Alfresco was upgraded to 4.0.2.11 (from 4.0.1).  Is it possible that some 
change in Alfresco APIs is preventing the BFSIT from recognizing the source 
files are in the content store file system already?

Original comment by ehar...@ziaconsulting.com on 10 Dec 2012 at 6:11

GoogleCodeExporter commented 9 years ago
Yep definitely possible, though unfortunate if that is the case!

The code that detects whether an in-place import is possible or not is 
isInContentStore() at line 169 of 
org.alfresco.extension.bulkfilesystemimport.impl.AbstractBulkFilesystemImporter 
[1].  Basically all it does is confirm that the contentstore is a 
FileContentStore then see whether the source path is within that 
FileContentStore's storage directory or not.

I'll add some debug logging to that method, but in the meantime are you able to 
copy that one method and run it independently (e.g. in a Web Script)?  That 
should give you some hints about what's going on.

[1] 
http://code.google.com/p/alfresco-bulk-filesystem-import/source/browse/src/main/
java/org/alfresco/extension/bulkfilesystemimport/impl/AbstractBulkFilesystemImpo
rter.java#169

Original comment by pmo...@gmail.com on 10 Dec 2012 at 6:45

GoogleCodeExporter commented 9 years ago

Original comment by pmo...@gmail.com on 11 Jan 2013 at 10:56

GoogleCodeExporter commented 9 years ago
It appears that Alfresco v4 changed the default content store - from a vanilla 
FileContentStore to an AbstractTenantRoutingContentStore [1] that wraps a 
single FileContentStore.  The isInContentStore() method mentioned above is 
therefore detecting that an in-place import is not possible and falling back on 
a streaming import (which will always work, no matter which content store is 
configured into Alfresco).

The fix is to implement issue #95, at least for the 
AbstractTenantRoutingContentStore.  Until that time the import tool won't 
support in-place imports on Alfresco v4+.

[1] 
http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/repo/tenant/A
bstractTenantRoutingContentStore.html

Original comment by pmo...@gmail.com on 17 Jan 2013 at 9:59

GoogleCodeExporter commented 9 years ago
This issue was closed by revision fab325a64458.

Original comment by pmo...@gmail.com on 18 Jan 2013 at 1:20

GoogleCodeExporter commented 9 years ago
Peter, are you planning to release an amp with this revision (the fix)?

Original comment by ehar...@ziaconsulting.com on 21 Jan 2013 at 6:39

GoogleCodeExporter commented 9 years ago
Yes - please refer to the roadmap [1].

[1] http://code.google.com/p/alfresco-bulk-filesystem-import/wiki/Roadmap

Original comment by pmo...@gmail.com on 21 Jan 2013 at 7:20

GoogleCodeExporter commented 9 years ago
Issue 122 has been merged into this issue.

Original comment by pmo...@gmail.com on 7 Feb 2013 at 12:12