Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(135)

Issue 96330043: FSA Add Config Options to Expire Content Based on LastAccess/LastModified Time (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by Brett
Modified:
11 years, 9 months ago
Reviewers:
myk, JohnL, mifern, pjo
CC:
connector-cr_google.com
Visibility:
Public.

Description

This change adds configuration options to expire content based on LastAccessTime and/or LastModifiedTime. Each allows two different forms of specification: - Expire content older than some specific date. (Absolute) - Expire content older than some number of days. (Relative) The configuration parameters are: filesystemadaptor.lastAccessedDate - Absolute last accessed time expiration filesystemadaptor.lastAccessedDays - Relative last accessed time expiration filesystemadaptor.lastModifiedDate - Absolute last modified time expiration filesystemadaptor.lastModifiedDays - Relative last modified time expiration Values for the Relative forms of configuration are positive integer number of days. For instance: filesystemadaptor.lastAccessedDays=365 would expire content that had not been accessed for a year. Values for the Absolute forms of configuration are ISO8601 date only format strings: yyyy-MM-dd. For instance: filesystemadaptor.lastModifiedDate=2010-06-01 would expire content that had not been modified since the beginning of June 2010.

Patch Set 1 #

Total comments: 9

Patch Set 2 : Update overview documentation. #

Total comments: 6

Patch Set 3 : Feedback and fixed long lines in the tests. #

Patch Set 4 : No future termination dates, John Connor. #

Total comments: 4

Patch Set 5 : Move SimpleDateFormat to a local variable to avoid thread safety issues. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+432 lines, -2 lines) Patch
M src/com/google/enterprise/adaptor/fs/FsAdaptor.java View 1 2 3 4 10 chunks +133 lines, -1 line 0 comments Download
M src/overview.html View 1 2 chunks +78 lines, -1 line 0 comments Download
M test/com/google/enterprise/adaptor/fs/FsAdaptorTest.java View 1 2 3 2 chunks +221 lines, -0 lines 0 comments Download

Messages

Total messages: 17
Brett
11 years, 9 months ago (2014-05-14 00:20:24 UTC) #1
pjo
Miguel and Marc, Please both review this CL. Brett, thanks for the detailed description. Thank ...
11 years, 9 months ago (2014-05-14 00:24:00 UTC) #2
Brett
Update overview documentation.
11 years, 9 months ago (2014-05-14 21:44:46 UTC) #3
mifern
Did you take incremental updates into consideration? https://codereview.appspot.com/96330043/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/96330043/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode314 src/com/google/enterprise/adaptor/fs/FsAdaptor.java:314: If the ...
11 years, 9 months ago (2014-05-14 21:49:21 UTC) #4
myk
LGTM -- only have one question (which occurs twice) about duplicate comments. https://codereview.appspot.com/96330043/diff/20001/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java ...
11 years, 9 months ago (2014-05-14 22:06:03 UTC) #5
Brett
On 2014/05/14 21:49:21, mifern wrote: > Did you take incremental updates into consideration? All filtering ...
11 years, 9 months ago (2014-05-14 22:06:22 UTC) #6
Brett
https://codereview.appspot.com/96330043/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/96330043/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode314 src/com/google/enterprise/adaptor/fs/FsAdaptor.java:314: On 2014/05/14 21:49:21, mifern wrote: > If the date ...
11 years, 9 months ago (2014-05-14 22:11:50 UTC) #7
Brett
Feedback and fixed long lines in the tests.
11 years, 9 months ago (2014-05-14 22:13:47 UTC) #8
myk
Thank you. (Still) LGTM. https://codereview.appspot.com/96330043/diff/20001/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/96330043/diff/20001/src/com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode101 src/com/google/enterprise/adaptor/fs/FsAdaptor.java:101: /** The config parameter name ...
11 years, 9 months ago (2014-05-14 22:16:03 UTC) #9
mifern
https://codereview.appspot.com/96330043/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/96330043/diff/1/src/com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode314 src/com/google/enterprise/adaptor/fs/FsAdaptor.java:314: I would lean towards a configuration error. On 2014/05/14 ...
11 years, 9 months ago (2014-05-14 22:18:06 UTC) #10
Brett
No future termination dates, John Connor.
11 years, 9 months ago (2014-05-14 22:45:29 UTC) #11
pjo
Thank you. LGTM.
11 years, 9 months ago (2014-05-15 19:09:39 UTC) #12
mifern
https://codereview.appspot.com/96330043/diff/60001/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/96330043/diff/60001/src/com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode115 src/com/google/enterprise/adaptor/fs/FsAdaptor.java:115: new SimpleDateFormat("yyyy-MM-dd"); We already had a SimpleDateFormat below. Can ...
11 years, 9 months ago (2014-05-15 21:18:10 UTC) #13
JohnL
https://codereview.appspot.com/96330043/diff/60001/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/96330043/diff/60001/src/com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode115 src/com/google/enterprise/adaptor/fs/FsAdaptor.java:115: new SimpleDateFormat("yyyy-MM-dd"); On 2014/05/15 21:18:09, mifern wrote: > We ...
11 years, 9 months ago (2014-05-15 21:24:47 UTC) #14
pjo
Thank you https://codereview.appspot.com/96330043/diff/60001/src/com/google/enterprise/adaptor/fs/FsAdaptor.java File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right): https://codereview.appspot.com/96330043/diff/60001/src/com/google/enterprise/adaptor/fs/FsAdaptor.java#newcode115 src/com/google/enterprise/adaptor/fs/FsAdaptor.java:115: new SimpleDateFormat("yyyy-MM-dd"); On 2014/05/15 21:24:47, John L ...
11 years, 9 months ago (2014-05-15 21:46:11 UTC) #15
Brett
Move SimpleDateFormat to a local variable to avoid thread safety issues.
11 years, 9 months ago (2014-05-16 00:47:55 UTC) #16
Brett
11 years, 9 months ago (2014-05-16 00:56:01 UTC) #17
Committed 15 May 2014 to Filesystem Adaptor:
To https://code.google.com/p/plexi.fs/
   cc553af..93cb90d  master -> master

https://codereview.appspot.com/96330043/diff/60001/src/com/google/enterprise/...
File src/com/google/enterprise/adaptor/fs/FsAdaptor.java (right):

https://codereview.appspot.com/96330043/diff/60001/src/com/google/enterprise/...
src/com/google/enterprise/adaptor/fs/FsAdaptor.java:115: new
SimpleDateFormat("yyyy-MM-dd");
On 2014/05/15 21:46:11, pjo wrote:
> On 2014/05/15 21:24:47, John L wrote:
> > On 2014/05/15 21:18:09, mifern wrote:
> > > We already had a SimpleDateFormat below. Can we use that instead? Also,
Eric
> > > suggested using ThreadLocal<SimpleDateFormat> instead of just
> SimpleDateFormat
> > > he had a reason for that, that I can't remember at the moment.
> > 
> > SimpleDateFormat is not thread-safe, so access must be synchronized or
> > restricted to a single thread.
> 
> 
> Make this instance live inside of method 
> it is used in.
> 
> No need for it to be instance or class variable.
> 
> Thank you

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b