[Oak origin/trunk] Apache Jackrabbit Oak matrix - Build # 1124 - Still Failing

2016-08-26 Thread Apache Jenkins Server
The Apache Jenkins build system has built Apache Jackrabbit Oak matrix (build 
#1124)

Status: Still Failing

Check console output at 
https://builds.apache.org/job/Apache%20Jackrabbit%20Oak%20matrix/1124/ to view 
the results.

Changes:
No changes
 

Test results:
1 tests failed.
FAILED:  
org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexQueryTest.sql2

Error Message:
Query took too long: select a.[jcr:path] from [nt:base] as a   left outer join 
[nt:base] as b on ischildnode(b, a)   where name(b) = 'b' took 13099 ms

Stack Trace:
java.lang.AssertionError: Query took too long: select a.[jcr:path] from 
[nt:base] as a
  left outer join [nt:base] as b on ischildnode(b, a)
  where name(b) = 'b' took 13099 ms
at org.junit.Assert.fail(Assert.java:88)
at 
org.apache.jackrabbit.oak.query.AbstractQueryTest.executeQuery(AbstractQueryTest.java:280)
at 
org.apache.jackrabbit.oak.query.AbstractQueryTest.executeQuery(AbstractQueryTest.java:255)
at 
org.apache.jackrabbit.oak.query.AbstractQueryTest.executeQuery(AbstractQueryTest.java:251)
at 
org.apache.jackrabbit.oak.query.AbstractQueryTest.test(AbstractQueryTest.java:187)
at 
org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexQueryTest.sql2(LuceneIndexQueryTest.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at 
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at 
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)




[Oak origin/1.2] Apache Jackrabbit Oak matrix - Build # 1123 - Failure

2016-08-26 Thread Apache Jenkins Server
The Apache Jenkins build system has built Apache Jackrabbit Oak matrix (build 
#1123)

Status: Failure

Check console output at 
https://builds.apache.org/job/Apache%20Jackrabbit%20Oak%20matrix/1123/ to view 
the results.

Changes:
[dj] OAK-4679 - Backport OAK-4119, OAK-4101, OAK-4087 and OAK-4344 - fixing

[reschke] OAK-4382: disable failing tests in 1.2

[amitj] OAK-4701: Test failure: SolrIndexQueryTestIT.testRepSimilarXPathQuery

[dj] OAK-4679 : Backport OAK-4119, OAK-4101, OAK-4087 and OAK-4344 - also

[reschke] OAK-4615: RDBDocumentStore: in 1.0, cache invalidation is slightly

 

Test results:
5 tests failed.
FAILED:  
org.apache.jackrabbit.oak.plugins.index.solr.index.SolrIndexHookIT.testPropertyAddition

Error Message:
expected:<[bar]> but was:<[]>

Stack Trace:
junit.framework.AssertionFailedError: expected:<[bar]> but was:<[]>
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.failNotEquals(Assert.java:329)
at junit.framework.Assert.assertEquals(Assert.java:78)
at junit.framework.Assert.assertEquals(Assert.java:86)
at 
org.apache.jackrabbit.oak.plugins.index.solr.index.SolrIndexHookIT.testPropertyAddition(SolrIndexHookIT.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at 
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at 
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at 
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at 
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at 
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)


FAILED:  
org.apache.jackrabbit.oak.plugins.index.lucene.LucenePropertyIndexTest.longRepExcerpt

Error Message:
Query took too long: SELECT [jcr:path],[rep:excerpt] from [nt:base] WHERE 
CONTAINS([text], 'foo') took 11768 ms

Stack Trace:
java.lang.AssertionError: Query took too long: SELECT [jcr:path],[rep:excerpt] 
from [nt:base] WHERE CONTAINS([text], 'foo') took 11768 ms
at org.junit.Assert.fail(Assert.java:88)
at 
org.apache.jackrabbit.oak.query.AbstractQueryTest.executeQuery(AbstractQueryTest.java:261)
at 
org.apache.jackrabbit.oak.query.AbstractQueryTest.assertQuery(AbstractQueryTest.java:294)
at 
org.apache.jackrabbit.oak.query.AbstractQueryTest.assertQuery(AbstractQueryTest.java:289)
at 
org.apache.jackrabbit.oak.plugins.index.lucene.LucenePropertyIndexTest.longRepExcerpt(LucenePropertyIndexTest.java:2095)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 

[RESULT][VOTE] Release Apache Jackrabbit Oak Segment Tar version 0.0.10

2016-08-26 Thread Francesco Mari
Hi,

The vote passes as follows:

+1 Francesco Mari
+1 Alex Parvulescu
+1 Michael Dürig

Thanks for voting. I'll push the release out.


Feedback on S3DataStore JMX stats patch (OAK-4712)

2016-08-26 Thread Matt Ryan
Hi Oak Devs,

I've created OAK-4712 and submitted a patch for the same.  I've attached
the same patch to this email.

The submission is to add a new MBean, S3DataStoreStats, which will allow
reporting via JMX about the state of the S3DataStore.  Two metrics are
intended.  The first is to report the number of files that are in the sync
state, meaning they have been added to the S3DataStore but are not yet
completely copied into S3.  The second is to allow to query the sync state
of a file - a return value of true would mean that the file provided is
fully synchronized.  This uses an external file name, not the internal ID.

I have some questions about the implementation first:
1. For the request to query the sync state of a file, should the file name
provided be a full path to a local file or a path to a file within OAK
(e.g. /content/dam/myimage.jpg)?  Current implementation uses a local file
path but I have been wondering if it should be an OAK path.
2. For the request to query the sync state of a file, when converting from
the externally-supplied file name to an internal DataIdentifier, this
implementation is performing the same calculation to determine the internal
ID name as is done when a file is stored.  I have a number of concerns with
this:
   - It is inefficient - the entire file has to be read and digested in
order to compute the internal ID.  This takes a long time for large assets.
   - I've essentially duplicated the logic from CachingDataStore into
S3DataStore to compute the internal ID.  I hate duplicating the code, but I
am trying to avoid exposing internal IDs in API, and I am not seeing a good
way in the current implementation to avoid this without either modifying
public API to CachingDataStore, or exposing the internal ID via API, or
both.

Any suggestions on these two issues?


I'm also experiencing a problem with this patch.  In my testing it appears
to work fine, until I delete a file.  For example, if I delete an asset via
the REST API, I will see the asset deleted in CRXDE.  However, the file
still remains in S3.  This MBean as implemented only knows how to check
with S3DataStore and the corresponding backend, and these all appear to
believe the file still exists.  So the MBean continues to report that the
file's sync state is synchronized (i.e. isFileSynced() returns true) even
though the file has been removed from the JCR.  Any suggestions on how to
resolve this?


Finally, any feedback on the patch is welcome.  And if I did the process
wrong please correct me (gently) - first time submission here.  Thanks
diff --git a/oak-blob-cloud/pom.xml b/oak-blob-cloud/pom.xml
index 800f716..ad3cb3c 100644
--- a/oak-blob-cloud/pom.xml
+++ b/oak-blob-cloud/pom.xml
@@ -41,7 +41,7 @@
 maven-bundle-plugin
 
 
-
org.apache.jackrabbit.oak.blob.cloud.aws.s3
+
org.apache.jackrabbit.oak.blob.cloud.aws.s3,org.apache.jackrabbit.oak.blob.cloud.aws.s3.stats
 sun.io
 
 
@@ -101,6 +101,13 @@
 ${jackrabbit.version}
 
 
+
+
+org.apache.jackrabbit
+oak-commons
+${project.version}
+
+
 
 
 com.amazonaws
@@ -140,6 +147,12 @@
 logback-classic
 test
 
+
+org.mockito
+mockito-core
+1.10.19
+test
+
 
 
 
diff --git 
a/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/aws/s3/S3DataStore.java
 
b/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/aws/s3/S3DataStore.java
index fc21bf6..be2ed54 100644
--- 
a/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/aws/s3/S3DataStore.java
+++ 
b/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/aws/s3/S3DataStore.java
@@ -16,17 +16,64 @@
  */
 package org.apache.jackrabbit.oak.blob.cloud.aws.s3;
 
+import java.io.FileInputStream;
+import java.io.OutputStream;
+import java.security.DigestOutputStream;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
 import java.util.Properties;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.io.output.NullOutputStream;
 import org.apache.jackrabbit.core.data.Backend;
 import org.apache.jackrabbit.core.data.CachingDataStore;
+import org.apache.jackrabbit.core.data.DataIdentifier;
+import org.apache.jackrabbit.core.data.DataStoreException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
  * An Amazon S3 data store.
  */
 public class S3DataStore extends CachingDataStore {
+
+/**
+ * Logger instance.
+ */
+

Re: Feedback on S3DataStore JMX stats patch (OAK-4712)

2016-08-26 Thread Matt Ryan
Use this patch instead; updated patch from latest in trunk.

On Fri, Aug 26, 2016 at 4:41 PM, Matt Ryan  wrote:

> Hi Oak Devs,
>
> I've created OAK-4712 and submitted a patch for the same.  I've attached
> the same patch to this email.
>
> The submission is to add a new MBean, S3DataStoreStats, which will allow
> reporting via JMX about the state of the S3DataStore.  Two metrics are
> intended.  The first is to report the number of files that are in the sync
> state, meaning they have been added to the S3DataStore but are not yet
> completely copied into S3.  The second is to allow to query the sync state
> of a file - a return value of true would mean that the file provided is
> fully synchronized.  This uses an external file name, not the internal ID.
>
> I have some questions about the implementation first:
> 1. For the request to query the sync state of a file, should the file name
> provided be a full path to a local file or a path to a file within OAK
> (e.g. /content/dam/myimage.jpg)?  Current implementation uses a local file
> path but I have been wondering if it should be an OAK path.
> 2. For the request to query the sync state of a file, when converting from
> the externally-supplied file name to an internal DataIdentifier, this
> implementation is performing the same calculation to determine the internal
> ID name as is done when a file is stored.  I have a number of concerns with
> this:
>- It is inefficient - the entire file has to be read and digested in
> order to compute the internal ID.  This takes a long time for large assets.
>- I've essentially duplicated the logic from CachingDataStore into
> S3DataStore to compute the internal ID.  I hate duplicating the code, but I
> am trying to avoid exposing internal IDs in API, and I am not seeing a good
> way in the current implementation to avoid this without either modifying
> public API to CachingDataStore, or exposing the internal ID via API, or
> both.
>
> Any suggestions on these two issues?
>
>
> I'm also experiencing a problem with this patch.  In my testing it appears
> to work fine, until I delete a file.  For example, if I delete an asset via
> the REST API, I will see the asset deleted in CRXDE.  However, the file
> still remains in S3.  This MBean as implemented only knows how to check
> with S3DataStore and the corresponding backend, and these all appear to
> believe the file still exists.  So the MBean continues to report that the
> file's sync state is synchronized (i.e. isFileSynced() returns true) even
> though the file has been removed from the JCR.  Any suggestions on how to
> resolve this?
>
>
> Finally, any feedback on the patch is welcome.  And if I did the process
> wrong please correct me (gently) - first time submission here.  Thanks
>
>
diff --git a/oak-blob-cloud/pom.xml b/oak-blob-cloud/pom.xml
index 800f716..ad3cb3c 100644
--- a/oak-blob-cloud/pom.xml
+++ b/oak-blob-cloud/pom.xml
@@ -41,7 +41,7 @@
 maven-bundle-plugin
 
 
-
org.apache.jackrabbit.oak.blob.cloud.aws.s3
+
org.apache.jackrabbit.oak.blob.cloud.aws.s3,org.apache.jackrabbit.oak.blob.cloud.aws.s3.stats
 sun.io
 
 
@@ -101,6 +101,13 @@
 ${jackrabbit.version}
 
 
+
+
+org.apache.jackrabbit
+oak-commons
+${project.version}
+
+
 
 
 com.amazonaws
@@ -140,6 +147,12 @@
 logback-classic
 test
 
+
+org.mockito
+mockito-core
+1.10.19
+test
+
 
 
 
diff --git 
a/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/aws/s3/S3DataStore.java
 
b/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/aws/s3/S3DataStore.java
index fc21bf6..be2ed54 100644
--- 
a/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/aws/s3/S3DataStore.java
+++ 
b/oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/aws/s3/S3DataStore.java
@@ -16,17 +16,64 @@
  */
 package org.apache.jackrabbit.oak.blob.cloud.aws.s3;
 
+import java.io.FileInputStream;
+import java.io.OutputStream;
+import java.security.DigestOutputStream;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
 import java.util.Properties;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.io.output.NullOutputStream;
 import org.apache.jackrabbit.core.data.Backend;
 import org.apache.jackrabbit.core.data.CachingDataStore;
+import org.apache.jackrabbit.core.data.DataIdentifier;
+import