Tuesday, April 16, 2013

Bulk file import in Alfresco

Used the bulk file import, found a bug in the in-place variant, so I had to use the streaming version (copy). But it was not that bad, 1 terabyte in a couple of hours. Well, Alfresco likes a great disk system :)

My recommendations:
  • So don't use In-place before this is fixed: http://code.google.com/p/alfresco-bulk-filesystem-import/issues/detail?id=125
  • Follow the tweaking here: http://wiki.alfresco.com/wiki/Bulk_Importer
  • Do not have the status page open (factor 2-4 slower)!
  • Delete from Alfresco can be slow, so do a test run (need a bulk delete?)


General Statistics
Status:
Successful
Source Directory:
/opt/alfresco/alf_data/bulk_fileimport
Target Space:
/Company Home/Data_Import
Import Type:
Streaming
Batch Weight:
100
Active Threads:
0 (of 0 total)
Start Date:
2013-04-15T20:08:54Z
End Date:
2013-04-15T23:08:32Z
Duration:
0d 2h 59m 37s 99.317ms
Number of Completed Batches:
21920
Source (read) Statistics
Last file or folder processed:
....
Scanned:
Folders
Files
Unreadable
21001
273420
0



Read:
Content
Metadata
Content Versions
Metadata Versions
273344 (915.49GB)
0 (0B
0 (0B)
0 (0B)



Throughput:
27.32 entries scanned / sec
25.36 files read / sec
86.99MB / sec
Target (write) Statistics
Space Nodes:
# Created
# Replaced
# Skipped
# Properties
21041
0
0
168328



Content Nodes:
# Created
# Replaced
# Skipped
Data Written
# Properties
273329
6
0
915.57GB
2186680



Content Versions:
# Created
Data Written
# Properties
0
0B
0



Throughput:
27.31 nodes / sec
86.99MB / sec

Freemind module now has indexing also

The previous post presented the freemind file preview without file indexing support, this post announces that this is now fixed by transforming to a text rendition of the mm files.

Tuesday, March 12, 2013

Freemind preview in Share






















Code and instructions on http://code.google.com/p/alfresco-freemind/

thanks to the other contributions from which I build this!

Tuesday, February 26, 2013

Generic printing of properties in complex javascript object

I needed to make a generic solution for printing ScriptNode and the like object to JSON using FreeMarker, without knowing which keys to include before the script runs ... So I wanted just to print all property like key and value pair (String/String).

Turns out this is a little cumbersome, so here is my 5 cents:

<#assign keys=item?keys>
<#assign values=item?values>
<#assign max=keys?size>
<#assign jsonIndex=0>
{

 <#list 0..max as index>
  <#if keys[index]?exists>
   <#if keys[index]?is_string>
    <#if values[index]?exists>
     <#if values[index]?is_string>
      <#if jsonIndex!=0>,

      <#else>
       <#assign jsonIndex=jsonIndex+1>
      </#if>
"${keys[index]}" : "${values[index]}"
     </#if>
    </#if>
   </#if>
  </#if>
 </#list>

}

Well, what does it do ... it keeps two different indexes, one for the key/value pair being processed and one for number of json lines added for adding commas. It seems FreeMarker cannot handle Hashes with non-strings, so to bypass this restriction you must index your way through and test for existens and for type being String. This is done over the keys and values sequences, which are read from item (Javascript object, which become a FreeMarker SimpleHash).

Friday, February 22, 2013

Easily make share the 'default' application in Tomcat

Normally you have a ROOT webapp in tomcat/webapps, which is a dummy Tomcat one.

To make this webapp redirect to i.e. alfresco share, when you type <server name>:<tomcat port> in your browser, but this in your tomcat/webapps/index.jsp file:

<%
response.sendRedirect("/share");
%>
 
If there is an index.html og index.htm file remove it.
 
Now index.jsp will redirect and you do not need to change the share-webapp 
 
Note: there is other ways using Tomcat context and stuff 

Saturday, February 16, 2013

Visio preview in Alfresco

Just tested Alfresco CE 4.2.c and Libreoffice 4.0 release, and looking through the release notes, saw that it had much improve Visio support (improved libvisio) ...

Well uploaded some samples from M$ and they all renders fine in thumbnail and preview PDF :)


Alfresco uses PDF.js viewer and Libreoffice 4.0


Libreoffice 4 release notes: https://www.libreoffice.org/download/4-0-new-features-and-fixes#Filters

Please not some older star office and MS office formats are no longer supported!

I tried use 'soffice.bin' instead of 'soffice' as program in alfresco-global.properties, this had the effect on my installation, that oosplash process is not started!

Friday, February 1, 2013

Alfresco webscript description file schema ...

I was mocking about and decided to test reverse engineering the Alfresco / Spring framework Webscript description file schema ...

https://code.google.com/p/alfresco-webscript-schema/

Beware this contains alot of features and some are probable coupled to the webscript kind (attribute) :)

Another schema by SURF - eclipse plugin: https://anonsvn.springframework.org/svn/se-surf/trunk/spring-surf-devtools/spring-surf-eclipse-extensions/spring-surf-webscript-editor/schemas/DescriptionXMLSchema.xsd