Review Board 1.7.22


FLUME-1181. Context must enforce dot-separated prefix for subproperties

Review Request #5017 - Created May 5, 2012 and submitted

Arvind Prabhakar
FLUME-1181
Reviewers
Flume
brocknoland, hshreedharan
Flume
This change:
* introduces a precondition check in Context.getSubProperties(String prefix) method enforce that the prefix ends with a period,
* fixes the TestPropertiesFileConfigurationProvider to load the property file which was previously not working, and fixes cases that are broken
* refactors some of the source (not all) to externalize the configuration keys into separate constants class
Ran all tests. The updated TestPropertiesFileConfigurationProvider catches two issues now - the one with channel selector configuration not being set correctly, and the other a similar issue with syslog source format configuration. Both of these issues have been fixed with the changes.

Also done some manual validation of the system with a few simple scenarios.
Content-Type: text/html; charset=utf-8
/trunk/flume-ng-configuration/src/main/java/org/apache/flume/Context.java
Revision 1334473 New Change
Diff currently unavailable.
Error: The file '/repos/asf/flume/trunk/flume-ng-configuration/src/main/java/org/apache/flume/Context.java' (r1334473) could not be found in the repository: '/repos/asf/!svn/bc/1334473/flume/trunk/flume-ng-configuration/src/main/java/org/apache/flume/Context.java' path not found
Details
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.22-py2.7.egg/reviewboard/diffviewer/views.py", line 117, in view_diff
    request=request)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.22-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 344, in populate_diff_chunks
    chunks = generator.get_chunks()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.22-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 137, in get_chunks
    large_data=True)
  File "/usr/local/lib/python2.7/dist-packages/Djblets-0.7.28-py2.7.egg/djblets/util/misc.py", line 157, in cache_memoize
    data = lookup_callable()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.22-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 136, in <lambda>
    lambda: list(self._get_chunks_uncached()),
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.22-py2.7.egg/reviewboard/diffviewer/chunk_generator.py", line 141, in _get_chunks_uncached
    old = get_original_file(self.filediff, self.request)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.22-py2.7.egg/reviewboard/diffviewer/diffutils.py", line 126, in get_original_file
    request=request)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.22-py2.7.egg/reviewboard/scmtools/models.py", line 192, in get_file
    large_data=True)[0]
  File "/usr/local/lib/python2.7/dist-packages/Djblets-0.7.28-py2.7.egg/djblets/util/misc.py", line 157, in cache_memoize
    data = lookup_callable()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.22-py2.7.egg/reviewboard/scmtools/models.py", line 191, in <lambda>
    request)],
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.22-py2.7.egg/reviewboard/scmtools/models.py", line 287, in _get_file_uncached
    data = self.get_scmtool().get_file(path, revision)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.22-py2.7.egg/reviewboard/scmtools/svn.py", line 191, in get_file
    return self._do_on_path(get_file_data, path, revision)
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-1.7.22-py2.7.egg/reviewboard/scmtools/svn.py", line 165, in _do_on_path
    raise FileNotFoundError(path, revision, detail=str(e))
FileNotFoundError: The file '/repos/asf/flume/trunk/flume-ng-configuration/src/main/java/org/apache/flume/Context.java' (r1334473) could not be found in the repository: '/repos/asf/!svn/bc/1334473/flume/trunk/flume-ng-configuration/src/main/java/org/apache/flume/Context.java' path not found
/trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/BasicConfigurationConstants.java
New File
 
/trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfiguration.java
Revision 1334473 New Change
 
/trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/FlumeConfiguration.java
Revision 1334473 New Change
 
/trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/sink/SinkGroupConfiguration.java
Revision 1334473 New Change
 
/trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java
Revision 1334473 New Change
 
/trunk/flume-ng-core/src/main/java/org/apache/flume/channel/ChannelSelectorFactory.java
Revision 1334473 New Change
 
/trunk/flume-ng-core/src/main/java/org/apache/flume/channel/MultiplexingChannelSelector.java
Revision 1334473 New Change
 
/trunk/flume-ng-core/src/main/java/org/apache/flume/source/SyslogSourceConfigurationConstants.java
New File
 
/trunk/flume-ng-core/src/main/java/org/apache/flume/source/SyslogTcpSource.java
Revision 1334473 New Change
 
/trunk/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUDPSource.java
Revision 1334473 New Change
 
/trunk/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java
Revision 1334473 New Change
 
/trunk/flume-ng-node/src/main/java/org/apache/flume/conf/properties/PropertiesFileConfigurationProvider.java
Revision 1334473 New Change
 
/trunk/flume-ng-node/src/test/java/org/apache/flume/conf/properties/TestPropertiesFileConfigurationProvider.java
Revision 1334473 New Change
 
/trunk/flume-ng-node/src/test/resources/flume-conf.properties
Revision 1334473 New Change
 
  1. /trunk/flume-ng-configuration/src/main/java/org/apache/flume/Context.java: Loading...
  2. /trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/BasicConfigurationConstants.java: Loading...
  3. /trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/ComponentConfiguration.java: Loading...
  4. /trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/FlumeConfiguration.java: Loading...
  5. /trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/sink/SinkGroupConfiguration.java: Loading...
  6. /trunk/flume-ng-configuration/src/main/java/org/apache/flume/conf/source/SourceConfiguration.java: Loading...
  7. /trunk/flume-ng-core/src/main/java/org/apache/flume/channel/ChannelSelectorFactory.java: Loading...
  8. /trunk/flume-ng-core/src/main/java/org/apache/flume/channel/MultiplexingChannelSelector.java: Loading...
  9. /trunk/flume-ng-core/src/main/java/org/apache/flume/source/SyslogSourceConfigurationConstants.java: Loading...
  10. /trunk/flume-ng-core/src/main/java/org/apache/flume/source/SyslogTcpSource.java: Loading...
  11. /trunk/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUDPSource.java: Loading...
  12. /trunk/flume-ng-core/src/main/java/org/apache/flume/source/SyslogUtils.java: Loading...
  13. /trunk/flume-ng-node/src/main/java/org/apache/flume/conf/properties/PropertiesFileConfigurationProvider.java: Loading...
  14. /trunk/flume-ng-node/src/test/java/org/apache/flume/conf/properties/TestPropertiesFileConfigurationProvider.java: Loading...
  15. /trunk/flume-ng-node/src/test/resources/flume-conf.properties: Loading...