From: <res...@us...> - 2010-10-13 15:08:35
|
Revision: 3787 http://bigdata.svn.sourceforge.net/bigdata/?rev=3787&view=rev Author: resendes Date: 2010-10-13 15:08:24 +0000 (Wed, 13 Oct 2010) Log Message: ----------- Merge from bbb_cleanup branch - added com.bigdata.util.config fixes - added com.bigdata.util.config unit tests Modified Paths: -------------- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/util/config/ConfigDeployUtil.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/util/config/ConfigurationUtil.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/util/config/Log4jLoggingHandler.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/util/config/LogUtil.java branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/util/config/NicUtil.java Added Paths: ----------- branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/util/config/ branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/util/config/ConfigDeployUtilTest.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/util/config/ConfigDeployUtilTest2.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/util/config/ConfigurationUtilTest.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/util/config/Log4jLoggingHandlerTest.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/util/config/LogUtilTest.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/util/config/NicUtilTest.java Removed Paths: ------------- branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/util/config/ConfigDeployUtilTest.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/util/config/ConfigDeployUtilTest2.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/util/config/ConfigurationUtilTest.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/util/config/Log4jLoggingHandlerTest.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/util/config/LogUtilTest.java branches/maven_scaleout/bigdata-core/src/test/java/com/bigdata/util/config/NicUtilTest.java Property Changed: ---------------- branches/maven_scaleout/ branches/maven_scaleout/bigdata-core/bigdata-perf/ branches/maven_scaleout/bigdata-core/bigdata-perf/lubm/src/resources/ branches/maven_scaleout/bigdata-core/dsi-utils/LEGAL/ branches/maven_scaleout/bigdata-core/dsi-utils/lib/ branches/maven_scaleout/bigdata-core/dsi-utils/src/ branches/maven_scaleout/bigdata-core/lgpl-utils/src/java/it/unimi/dsi/fastutil/bytes/custom/ branches/maven_scaleout/bigdata-core/lgpl-utils/src/test/it/unimi/dsi/fastutil/bytes/custom/ branches/maven_scaleout/bigdata-core/osgi/ branches/maven_scaleout/bigdata-core/src/main/deploy/bin/ branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/jini/ branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/jini/boot/ branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/logging/ branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties branches/maven_scaleout/bigdata-core/src/main/java/ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/attr/ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/disco/ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/rdf/sail/bench/ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/rdf/util/ branches/maven_scaleout/bigdata-core/src/samples-sail/com/bigdata/samples/fastload.properties branches/maven_scaleout/bigdata-core/src/test/deploy/testing/conf/bigdataStandaloneTesting.config branches/maven_scaleout/bigdata-core/src/test/deploy/testing/data/com/bigdata/jini/start/config/testfed.config branches/maven_scaleout/bigdata-core/src/test/deploy/testing/data/com/bigdata/jini/start/testfed.config branches/maven_scaleout/bigdata-core/src/test/deploy/testing/data/com/bigdata/service/jini/master/TestMappedRDFDataLoadMaster.config branches/maven_scaleout/bigdata-core/src/test/java/ Property changes on: branches/maven_scaleout ___________________________________________________________________ Modified: svn:mergeinfo - /branches/BTREE_BUFFER_BRANCH:2004-2045 /branches/DEV_BRANCH_27_OCT_2009:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH:2633-3304 /branches/bugfix-btm:2594-3237 /branches/dev-btm:2574-3440,3443,3463,3469-3470 /branches/fko:3150-3194 /branches/maven_scaleout:3379-3438 /trunk:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 + /branches/BTREE_BUFFER_BRANCH:2004-2045 /branches/DEV_BRANCH_27_OCT_2009:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH:2633-3304 /branches/bbb_cleanup:3709-3781 /branches/bugfix-btm:2594-3237 /branches/dev-btm:2574-3440,3443,3463,3469-3470 /branches/fko:3150-3194 /branches/maven_scaleout:3379-3438 /trunk:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 Property changes on: branches/maven_scaleout/bigdata-core/bigdata-perf ___________________________________________________________________ Modified: svn:mergeinfo - /branches/bbb_cleanup/bigdata-core/bigdata-perf:3588-3690 /trunk/bigdata-perf:3379-3541 + /branches/bbb_cleanup/bigdata-core/bigdata-perf:3588-3690,3709-3781 /trunk/bigdata-perf:3379-3541 Property changes on: branches/maven_scaleout/bigdata-core/bigdata-perf/lubm/src/resources ___________________________________________________________________ Modified: svn:mergeinfo - /branches/bbb_cleanup/bigdata-core/bigdata-perf/lubm/src/resources:3588-3690 /branches/dev-btm/bigdata-perf/lubm/src/resources:2574-3440 /trunk/bigdata-perf/lubm/src/resources:3379-3541 + /branches/bbb_cleanup/bigdata-core/bigdata-perf/lubm/src/resources:3588-3690,3709-3781 /branches/dev-btm/bigdata-perf/lubm/src/resources:2574-3440 /trunk/bigdata-perf/lubm/src/resources:3379-3541 Property changes on: branches/maven_scaleout/bigdata-core/dsi-utils/LEGAL ___________________________________________________________________ Modified: svn:mergeinfo - /branches/bbb_cleanup/bigdata-core/dsi-utils/LEGAL:3588-3690 /trunk/dsi-utils/LEGAL:3379-3430,3499 + /branches/bbb_cleanup/bigdata-core/dsi-utils/LEGAL:3588-3690,3709-3781 /trunk/dsi-utils/LEGAL:3379-3430,3499 Property changes on: branches/maven_scaleout/bigdata-core/dsi-utils/lib ___________________________________________________________________ Modified: svn:mergeinfo - /branches/bbb_cleanup/bigdata-core/dsi-utils/lib:3588-3690 /trunk/dsi-utils/lib:3379-3430,3499 + /branches/bbb_cleanup/bigdata-core/dsi-utils/lib:3588-3690,3709-3781 /trunk/dsi-utils/lib:3379-3430,3499 Property changes on: branches/maven_scaleout/bigdata-core/dsi-utils/src ___________________________________________________________________ Modified: svn:mergeinfo - /branches/bbb_cleanup/bigdata-core/dsi-utils/src:3588-3690 /trunk/dsi-utils/src:3379-3430,3499 + /branches/bbb_cleanup/bigdata-core/dsi-utils/src:3588-3690,3709-3781 /trunk/dsi-utils/src:3379-3430,3499 Property changes on: branches/maven_scaleout/bigdata-core/lgpl-utils/src/java/it/unimi/dsi/fastutil/bytes/custom ___________________________________________________________________ Modified: svn:mergeinfo - /branches/bbb_cleanup/bigdata-core/lgpl-utils/src/java/it/unimi/dsi/fastutil/bytes/custom:3588-3690 /trunk/lgpl-utils/src/java/it/unimi/dsi/fastutil/bytes/custom:3379-3430,3499 + /branches/bbb_cleanup/bigdata-core/lgpl-utils/src/java/it/unimi/dsi/fastutil/bytes/custom:3588-3690,3709-3781 /trunk/lgpl-utils/src/java/it/unimi/dsi/fastutil/bytes/custom:3379-3430,3499 Property changes on: branches/maven_scaleout/bigdata-core/lgpl-utils/src/test/it/unimi/dsi/fastutil/bytes/custom ___________________________________________________________________ Modified: svn:mergeinfo - /branches/bbb_cleanup/bigdata-core/lgpl-utils/src/test/it/unimi/dsi/fastutil/bytes/custom:3588-3690 /trunk/lgpl-utils/src/test/it/unimi/dsi/fastutil/bytes/custom:3379-3430,3499 + /branches/bbb_cleanup/bigdata-core/lgpl-utils/src/test/it/unimi/dsi/fastutil/bytes/custom:3588-3690,3709-3781 /trunk/lgpl-utils/src/test/it/unimi/dsi/fastutil/bytes/custom:3379-3430,3499 Property changes on: branches/maven_scaleout/bigdata-core/osgi ___________________________________________________________________ Modified: svn:mergeinfo - /branches/bbb_cleanup/bigdata-core/osgi:3588-3690 /trunk/osgi:3379-3430,3499 + /branches/bbb_cleanup/bigdata-core/osgi:3588-3690,3709-3781 /trunk/osgi:3379-3430,3499 Property changes on: branches/maven_scaleout/bigdata-core/src/main/deploy/bin ___________________________________________________________________ Modified: svn:mergeinfo - /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/bin:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/bin:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/bin:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/bin:3588-3690 /branches/bugfix-btm/bigdata-core/src/main/deploy/bin:2594-3237 /branches/dev-btm/bigdata-core/src/main/deploy/bin:2574-3440,3443,3463,3469-3470 /branches/dev-btm/src/resources/bin:3463 /branches/fko/bigdata-core/src/main/deploy/bin:3150-3194 /trunk/bigdata-core/src/main/deploy/bin:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 + /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/bin:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/bin:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/bin:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/bin:3588-3690,3709-3781 /branches/bugfix-btm/bigdata-core/src/main/deploy/bin:2594-3237 /branches/dev-btm/bigdata-core/src/main/deploy/bin:2574-3440,3443,3463,3469-3470 /branches/dev-btm/src/resources/bin:3463 /branches/fko/bigdata-core/src/main/deploy/bin:3150-3194 /trunk/bigdata-core/src/main/deploy/bin:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 Property changes on: branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/jini ___________________________________________________________________ Modified: svn:mergeinfo - /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/jini:3588-3690 /trunk/src/main/deploy/var/config/jini:3499 /trunk/src/resources/config:3516-3528 + /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/jini:3588-3690,3709-3781 /trunk/src/main/deploy/var/config/jini:3499 /trunk/src/resources/config:3516-3528 Property changes on: branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config ___________________________________________________________________ Modified: svn:mergeinfo - /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:3588-3690 /branches/bugfix-btm/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:2594-3237 /branches/dev-btm/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:2574-3440,3443,3463,3469-3470 /branches/dev-btm/src/resources/config/bigdataCluster.config:3463 /branches/fko/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:3150-3194 /trunk/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 /trunk/src/resources/config/bigdataCluster.config:3516-3528 + /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:3588-3690,3709-3781 /branches/bugfix-btm/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:2594-3237 /branches/dev-btm/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:2574-3440,3443,3463,3469-3470 /branches/dev-btm/src/resources/config/bigdataCluster.config:3463 /branches/fko/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:3150-3194 /trunk/bigdata-core/src/main/deploy/var/config/jini/bigdataCluster.config:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 /trunk/src/resources/config/bigdataCluster.config:3516-3528 Property changes on: branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/jini/boot ___________________________________________________________________ Modified: svn:mergeinfo - /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/var/config/jini/boot:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/var/config/jini/boot:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/var/config/jini/boot:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/jini/boot:3588-3690 /branches/bugfix-btm/bigdata-core/src/main/deploy/var/config/jini/boot:2594-3237 /branches/dev-btm/bigdata-core/src/main/deploy/var/config/jini/boot:2574-3440,3443,3463,3469-3470 /branches/dev-btm/bigdata-jini/src/java/com/bigdata/boot/config:3469-3470 /branches/fko/bigdata-core/src/main/deploy/var/config/jini/boot:3150-3194 /branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/jini/boot:3379-3438 /trunk/bigdata-core/src/main/deploy/var/config/jini/boot:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 + /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/var/config/jini/boot:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/var/config/jini/boot:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/var/config/jini/boot:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/jini/boot:3588-3690,3709-3781 /branches/bugfix-btm/bigdata-core/src/main/deploy/var/config/jini/boot:2594-3237 /branches/dev-btm/bigdata-core/src/main/deploy/var/config/jini/boot:2574-3440,3443,3463,3469-3470 /branches/dev-btm/bigdata-jini/src/java/com/bigdata/boot/config:3469-3470 /branches/fko/bigdata-core/src/main/deploy/var/config/jini/boot:3150-3194 /branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/jini/boot:3379-3438 /trunk/bigdata-core/src/main/deploy/var/config/jini/boot:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 Property changes on: branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config ___________________________________________________________________ Modified: svn:mergeinfo - /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:3588-3690 /branches/bugfix-btm/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:2594-3237 /branches/dev-btm/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:2574-3440,3443,3463,3469-3470 /branches/dev-btm/bigdata-jini/src/java/com/bigdata/metadata/config/shardlocator.config:3463 /branches/fko/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:3150-3194 /trunk/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 + /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:3588-3690,3709-3781 /branches/bugfix-btm/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:2594-3237 /branches/dev-btm/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:2574-3440,3443,3463,3469-3470 /branches/dev-btm/bigdata-jini/src/java/com/bigdata/metadata/config/shardlocator.config:3463 /branches/fko/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:3150-3194 /trunk/bigdata-core/src/main/deploy/var/config/jini/shardlocator.config:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 Property changes on: branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/logging ___________________________________________________________________ Modified: svn:mergeinfo - /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/var/config/logging:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/var/config/logging:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/var/config/logging:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/logging:3588-3690 /branches/bugfix-btm/bigdata-core/src/main/deploy/var/config/logging:2594-3237 /branches/dev-btm/bigdata/src/resources/logging:3463 /branches/dev-btm/bigdata-core/src/main/deploy/var/config/logging:2574-3440,3443,3463,3469-3470 /branches/fko/bigdata-core/src/main/deploy/var/config/logging:3150-3194 /trunk/bigdata-core/src/main/deploy/var/config/logging:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 + /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/var/config/logging:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/var/config/logging:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/var/config/logging:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/logging:3588-3690,3709-3781 /branches/bugfix-btm/bigdata-core/src/main/deploy/var/config/logging:2594-3237 /branches/dev-btm/bigdata/src/resources/logging:3463 /branches/dev-btm/bigdata-core/src/main/deploy/var/config/logging:2574-3440,3443,3463,3469-3470 /branches/fko/bigdata-core/src/main/deploy/var/config/logging:3150-3194 /trunk/bigdata-core/src/main/deploy/var/config/logging:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 Property changes on: branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties ___________________________________________________________________ Modified: svn:mergeinfo - /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:3588-3690 /branches/bugfix-btm/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:2594-3237 /branches/dev-btm/bigdata/src/resources/logging/shardlocator-logging.properties:3463 /branches/dev-btm/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:2574-3440,3443,3463,3469-3470 /branches/dev-btm/bigdata-jini/src/java/com/bigdata/metadata/config/logging.properties:3463 /branches/fko/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:3150-3194 /trunk/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 + /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:3588-3690,3709-3781 /branches/bugfix-btm/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:2594-3237 /branches/dev-btm/bigdata/src/resources/logging/shardlocator-logging.properties:3463 /branches/dev-btm/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:2574-3440,3443,3463,3469-3470 /branches/dev-btm/bigdata-jini/src/java/com/bigdata/metadata/config/logging.properties:3463 /branches/fko/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:3150-3194 /trunk/bigdata-core/src/main/deploy/var/config/logging/shardlocator-logging.properties:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 Property changes on: branches/maven_scaleout/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties ___________________________________________________________________ Modified: svn:mergeinfo - /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:3588-3690 /branches/bugfix-btm/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:2594-3237 /branches/dev-btm/bigdata/src/resources/logging/transaction-logging.properties:3463 /branches/dev-btm/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:2574-3440,3443,3463,3469-3470 /branches/dev-btm/bigdata-jini/src/java/com/bigdata/transaction/config/logging.properties:3463 /branches/fko/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:3150-3194 /trunk/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 + /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:3588-3690,3709-3781 /branches/bugfix-btm/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:2594-3237 /branches/dev-btm/bigdata/src/resources/logging/transaction-logging.properties:3463 /branches/dev-btm/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:2574-3440,3443,3463,3469-3470 /branches/dev-btm/bigdata-jini/src/java/com/bigdata/transaction/config/logging.properties:3463 /branches/fko/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:3150-3194 /trunk/bigdata-core/src/main/deploy/var/config/logging/transaction-logging.properties:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 Property changes on: branches/maven_scaleout/bigdata-core/src/main/java ___________________________________________________________________ Modified: svn:mergeinfo - /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/java:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/java:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/java:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/java:3588-3690 /branches/bugfix-btm/bigdata-core/src/main/java:2594-3237 /branches/dev-btm/bigdata/src/java:3463 /branches/dev-btm/bigdata-core/src/main/java:2574-3440,3443,3463,3469-3470 /branches/dev-btm/bigdata-jini/src/java:3463,3469-3470 /branches/dev-btm/bigdata-rdf/src/java:3463 /branches/dev-btm/bigdata-sails/src/java:3463 /branches/fko/bigdata-core/src/main/java:3150-3194 /trunk/bigdata/src/java:3507 /trunk/bigdata-core/src/main/java:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 /trunk/bigdata-rdf/src/java:3542 + /branches/BTREE_BUFFER_BRANCH/bigdata-core/src/main/java:2004-2045 /branches/DEV_BRANCH_27_OCT_2009/bigdata-core/src/main/java:2270-2546,2548-2782 /branches/LEXICON_REFACTOR_BRANCH/bigdata-core/src/main/java:2633-3304 /branches/bbb_cleanup/bigdata-core/src/main/java:3588-3690,3709-3781 /branches/bugfix-btm/bigdata-core/src/main/java:2594-3237 /branches/dev-btm/bigdata/src/java:3463 /branches/dev-btm/bigdata-core/src/main/java:2574-3440,3443,3463,3469-3470 /branches/dev-btm/bigdata-jini/src/java:3463,3469-3470 /branches/dev-btm/bigdata-rdf/src/java:3463 /branches/dev-btm/bigdata-sails/src/java:3463 /branches/fko/bigdata-core/src/main/java:3150-3194 /trunk/bigdata/src/java:3507 /trunk/bigdata-core/src/main/java:3379-3430,3432-3460,3476-3499,3503,3507,3516-3528,3542 /trunk/bigdata-rdf/src/java:3542 Property changes on: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/attr ___________________________________________________________________ Modified: svn:mergeinfo - /branches/bbb_cleanup/bigdata-core/src/main/java/com/bigdata/attr:3588-3690 /branches/dev-btm/bigdata-jini/src/java/com/bigdata/attr:3463,3469-3470 /trunk/bigdata-jini/src/java/com/bigdata/attr:3379-3430 + /branches/bbb_cleanup/bigdata-core/src/main/java/com/bigdata/attr:3588-3690,3709-3781 /branches/dev-btm/bigdata-jini/src/java/com/bigdata/attr:3463,3469-3470 /trunk/bigdata-jini/src/java/com/bigdata/attr:3379-3430 Property changes on: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/disco ___________________________________________________________________ Modified: svn:mergeinfo - /branches/bbb_cleanup/bigdata-core/src/main/java/com/bigdata/disco:3588-3690 /branches/dev-btm/bigdata-jini/src/java/com/bigdata/disco:3463,3469-3470 /trunk/bigdata-jini/src/java/com/bigdata/disco:3379-3430 + /branches/bbb_cleanup/bigdata-core/src/main/java/com/bigdata/disco:3588-3690,3709-3781 /branches/dev-btm/bigdata-jini/src/java/com/bigdata/disco:3463,3469-3470 /trunk/bigdata-jini/src/java/com/bigdata/disco:3379-3430 Property changes on: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/rdf/sail/bench ___________________________________________________________________ Modified: svn:mergeinfo - /branches/bbb_cleanup/bigdata-core/src/main/java/com/bigdata/rdf/sail/bench:3588-3690 /branches/dev-btm/bigdata-sails/src/java/com/bigdata/rdf/sail/bench:3463 /trunk/bigdata-sails/src/java/com/bigdata/rdf/sail/bench:3379-3430 + /branches/bbb_cleanup/bigdata-core/src/main/java/com/bigdata/rdf/sail/bench:3588-3690,3709-3781 /branches/dev-btm/bigdata-sails/src/java/com/bigdata/rdf/sail/bench:3463 /trunk/bigdata-sails/src/java/com/bigdata/rdf/sail/bench:3379-3430 Property changes on: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/rdf/util ___________________________________________________________________ Modified: svn:mergeinfo - /branches/bbb_cleanup/bigdata-core/src/main/java/com/bigdata/rdf/util:3588-3690 /branches/dev-btm/bigdata-rdf/src/java/com/bigdata/rdf/util:3463 /trunk/bigdata-rdf/src/java/com/bigdata/rdf/util:3379-3430,3542 + /branches/bbb_cleanup/bigdata-core/src/main/java/com/bigdata/rdf/util:3588-3690,3709-3781 /branches/dev-btm/bigdata-rdf/src/java/com/bigdata/rdf/util:3463 /trunk/bigdata-rdf/src/java/com/bigdata/rdf/util:3379-3430,3542 Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/util/config/ConfigDeployUtil.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/util/config/ConfigDeployUtil.java 2010-10-13 14:18:44 UTC (rev 3786) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/util/config/ConfigDeployUtil.java 2010-10-13 15:08:24 UTC (rev 3787) @@ -34,6 +34,8 @@ import java.io.FileInputStream; import java.io.IOException; import java.net.SocketException; +import java.text.NumberFormat; +import java.text.ParseException; import java.util.Arrays; import java.util.List; import java.util.Properties; @@ -46,6 +48,12 @@ * invoked from within a Jini configuration. */ public class ConfigDeployUtil { + + private ConfigDeployUtil() { + //prevent instantiation + throw new AssertionError + ("ConfigDeployUtil cannot be instantiated"); + } private static Properties deploymentProps = null; @@ -57,8 +65,26 @@ private static final String TYPE = ".type"; private static final String FALLBACK_FEDNAME_FORMAT = "bigdata.test.group-%s"; - private static final String TEMPLATE_TOKEN_PATTERN = "@.*@"; + + //use current locale + private static final NumberFormat numberFormat = NumberFormat.getInstance(); + /** + * Gets the <code>String</code> value associated with the given parameter + * in the configured properties file. The value, if any, returned will be: + * 1) the explicitly defined value for the property, or + * 2) the default value for that property, if a default exists. + * If the provided parameter has an associated set of valid entries in the + * properties files, then the value obtained, above, will be validated + * against those entries. If either the value (explicit or default) can't be + * found or fails the validation check, + * a <code>ConfigurationException</code> will be thrown. + * @param parameter The property name to lookup + * @return the <code>String</code> value associated the requested parameter, + * if available + * @throws ConfigurationException if the parameter value + * (explicit or default) was not defined. + */ public static String getString(String parameter) throws ConfigurationException { @@ -66,7 +92,23 @@ validateString(parameter, value); return value; } - + + /** + * Gets the <code>String[]</code> value associated with the given parameter + * in the configured properties file. The value, if any, returned will be: + * 1) the explicitly defined value for the property, or + * 2) the default value for that property, if a default exists. + * If the provided parameter has an associated set of valid entries in the + * properties files, then the component values obtained, above, will be validated + * against those entries. If either the value (explicit or default) can't be + * found or fails the validation check, + * a <code>ConfigurationException</code> will be thrown. + * @param parameter The property name to lookup + * @return the <code>String[]</code> value associated the requested parameter, + * if available + * @throws ConfigurationException if the parameter value + * (explicit or default) was not defined. + */ public static String[] getStringArray(String parameter) throws ConfigurationException { @@ -75,12 +117,46 @@ return value; } + /** + * Gets the <code>int</code> value associated with the given parameter + * in the configured properties file. The value, if any, returned will be: + * 1) the explicitly defined value for the property, or + * 2) the default value for that property, if a default exists. + * If the provided parameter has an associated set of valid entries in the + * properties files, then the value obtained, above, will be validated + * against those entries. If either the value (explicit or default) can't be + * found or fails the validation check, + * a <code>ConfigurationException</code> will be thrown. + * @param parameter The property name to lookup + * @return the <code>int</code> value associated the requested parameter, + * if available + * @throws ConfigurationException if the parameter value + * (explicit or default) was not defined. + */ + public static int getInt(String parameter) throws ConfigurationException { int value; value = validateInt(parameter, get(parameter)); return value; } + /** + * Gets the <code>long</code> value associated with the given parameter + * in the configured properties file. The value, if any, returned will be: + * 1) the explicitly defined value for the property, or + * 2) the default value for that property, if a default exists. + * If the provided parameter has an associated set of valid entries in the + * properties files, then the value obtained, above, will be validated + * against those entries. If either the value (explicit or default) can't be + * found or fails the validation check, + * a <code>ConfigurationException</code> will be thrown. + * @param parameter The property name to lookup + * @return the <code>long</code> value associated the requested parameter, + * if available + * @throws ConfigurationException if the parameter value + * (explicit or default) was not defined. + */ + public static long getLong(String parameter) throws ConfigurationException { long value; @@ -88,60 +164,97 @@ return value; } - public static boolean getBoolean(String parameter) + /** + * Gets the <code>boolean</code> value associated with the given parameter + * in the configured properties file. The value, if any, returned will be: + * 1) the explicitly defined value for the property, or + * 2) the default value for that property, if a default exists. + * If the provided parameter has an associated set of valid entries in the + * properties files, then the value obtained, above, will be validated + * against those entries. If either the value (explicit or default) can't be + * found or fails the validation check, + * a <code>ConfigurationException</code> will be thrown. + * @param parameter The property name to lookup + * @return the <code>boolean</code> value associated the requested parameter, + * if available + * @throws ConfigurationException if the parameter value + * (explicit or default) was not defined. + */ + public static boolean getBoolean(String parameter) throws ConfigurationException + { + boolean value; + value = validateBoolean(parameter, get(parameter)); + return value; + } + + private static boolean validateBoolean(String parameter, String value) throws ConfigurationException { boolean boolValue = false; - String value; - try { - value = get(parameter); - } catch (Exception ex) { - throw new ConfigurationException("parameter value ["+parameter+"] " - +"neither 'true' nor 'false'"); - } - if( value != null && value.equalsIgnoreCase("true") - || value.equalsIgnoreCase("false") ) + + if( value != null && (value.equalsIgnoreCase("true") + || value.equalsIgnoreCase("false")) ) { boolValue = Boolean.parseBoolean(value); } else { throw new ConfigurationException("parameter value ["+parameter+"] " - +"neither 'true' nor 'false'"); + +"is neither 'true' nor 'false'"); } return boolValue; } + /** + * Gets the description value associated with the given parameter + * in the configured properties file. The method returns + * <code>null</code> if the property is not found. + * @param parameter The property name to lookup + * @return the <code>String</code> value associated the requested parameter, + * if available. Otherwise return <code>null</code> + * @throws ConfigurationException if there was a problem accessing + * the parameter value. + */ + public static String getDescription(String parameter) throws ConfigurationException { String value; - if(deploymentProps == null) { - deploymentProps = new Properties(); - loadDeployProps(deploymentProps); - } - value = deploymentProps.getProperty(parameter + DESCRIPTION); + value = getDeploymentProperties().getProperty(parameter + DESCRIPTION); return value; } + /** + * Gets the type value associated with the given parameter + * in the configured properties file. The method returns + * <code>null</code> if the property is not found. + * @param parameter The property name to lookup + * @return the <code>String</code> value of the type + * associated the requested parameter, + * if available. Otherwise return <code>null</code> + * @throws ConfigurationException if there was a problem accessing + * the parameter value. + */ + public static String getType(String parameter) throws ConfigurationException { String value; - if (deploymentProps == null) { - deploymentProps = new Properties(); - loadDeployProps(deploymentProps); - } - value = deploymentProps.getProperty(parameter + TYPE); + value = getDeploymentProperties().getProperty(parameter + TYPE); return value; } + /** + * Gets the default value associated with the given parameter + * in the configured properties file. + * @param parameter The property name to lookup + * @return the <code>String</code> value of the type + * associated the requested parameter, + * if available. Otherwise return <code>null</code> + * @throws ConfigurationException if no default value was specified + */ public static String getDefault(String parameter) throws ConfigurationException { String value; - if (deploymentProps == null) { - deploymentProps = new Properties(); - loadDeployProps(deploymentProps); - } - value = deploymentProps.getProperty(parameter + DEFAULT); + value = getDeploymentProperties().getProperty(parameter + DEFAULT); if (value == null) { throw new ConfigurationException ("deployment parameter not found ["+parameter+"]"); @@ -150,7 +263,7 @@ } /** - * Returns a <code>String</code> array whose elments represent the + * Returns a <code>String</code> array whose elements represent the * lookup service groups to discover. If the system property named * "federation.name" is set then that value be used; otherwise, * the deployment properties files will be consulted. @@ -164,7 +277,7 @@ } /** - * Retrieve the federation name (also used as Jini group name) via this pecking pecking order: + * Retrieve the federation name (also used as Jini group name) via this pecking order: * <ol> * <li>From the Java system property: <code>federation.name</code></li> * <li>From the deployment properties file. Note that a value from the deployment @@ -254,11 +367,7 @@ private static String get(String parameter) throws ConfigurationException { String value; - if (deploymentProps == null) { - deploymentProps = new Properties(); - loadDeployProps(deploymentProps); - } - value = deploymentProps.getProperty(parameter); + value = getDeploymentProperties().getProperty(parameter); if (value == null) value = getDefault(parameter); return value; } @@ -267,7 +376,7 @@ throws ConfigurationException { String validValuesStr = - (String) deploymentProps.get(parameter + STRINGVALS); + (String) getDeploymentProperties().get(parameter + STRINGVALS); if (validValuesStr != null) { String[] validValues = validValuesStr.split(","); @@ -284,7 +393,7 @@ throws ConfigurationException { String validValuesStr = - (String)(deploymentProps.get(parameter + STRINGVALS)); + (String)(getDeploymentProperties().get(parameter + STRINGVALS)); String[] values = value.split(","); if (validValuesStr != null) { @@ -304,48 +413,77 @@ private static int validateInt(String parameter, String strvalue) throws ConfigurationException { - String maxString = (String)(deploymentProps.get(parameter + MAX)); - String minString = (String)(deploymentProps.get(parameter + MIN)); + String maxString = (String)(getDeploymentProperties().get(parameter + MAX)); + String minString = (String)(getDeploymentProperties().get(parameter + MIN)); int value = str2int(strvalue); if (maxString != null) { - int max = Integer.parseInt(maxString); - if (value > max) { - throw new ConfigurationException("parameter ["+parameter+"] " - +"exceeds maximum ["+max+"]"); + try { + int max = numberFormat.parse(maxString).intValue(); + if (value > max) { + throw new ConfigurationException("parameter ["+parameter+"] " + +"exceeds maximum ["+max+"]"); + } + } catch (ParseException e) { + throw new NumberFormatException( + "Invalid maximum integer for parameter: " + parameter); + } } + + if (minString != null) { + try { + int min = numberFormat.parse(minString).intValue(); + if (value < min) { + throw new ConfigurationException("parameter ["+parameter+"] " + + "is less than manimum ["+min+"]"); + } + } catch (ParseException e) { + throw new NumberFormatException( + "Invalid minimum integer for parameter: " + parameter); + } + } + return value; } private static long validateLong(String parameter, String strvalue) throws ConfigurationException { - String maxString = (String)(deploymentProps.get(parameter + MAX)); - String minString = (String)(deploymentProps.get(parameter + MIN)); + String maxString = (String)(getDeploymentProperties().get(parameter + MAX)); + String minString = (String)(getDeploymentProperties().get(parameter + MIN)); long value = str2long(strvalue); if (maxString != null) { - long max = Long.parseLong(maxString); - if (value > max) { - throw new ConfigurationException("parameter ["+parameter+"] " - +"exceeds maximum ["+max+"]"); + try { + long max = numberFormat.parse(maxString).longValue(); + if (value > max) { + throw new ConfigurationException("parameter ["+parameter+"] " + +"exceeds maximum ["+max+"]"); + } + } catch (ParseException e) { + throw new NumberFormatException( + "Invalid maximum long for parameter: " + parameter); + } } if (minString != null) { - long min = Long.parseLong(minString); - if (value < min) { - throw new ConfigurationException("parameter ["+parameter+"] " - +"is less than manimum " - +"["+min+"]"); - } + try { + long min = numberFormat.parse(minString).longValue(); + if (value < min) { + throw new ConfigurationException("parameter ["+parameter+"] " + + "is less than manimum ["+min+"]"); + } + } catch (ParseException e) { + throw new NumberFormatException( + "Invalid minimum long for parameter: " + parameter); + } } return value; } - private static File getPropertiesPath() { File rootDir = new File("/opt/bigdata"); //real installation String appHome = System.getProperty("appHome");//pstart @@ -372,30 +510,23 @@ } private static void loadDefaultProps(Properties deployProps) { - FileInputStream fis = null; - try { - File flnm = new File(getPropertiesPath(), "default-deploy.properties"); - fis = new FileInputStream(flnm); - deployProps.load(fis); - } catch (Exception ex) { - ex.printStackTrace(); - } finally { - if (fis != null) { - try { - fis.close(); - } catch (IOException ioex) { /* swallow */ } - } - } + loadPropsInternal("default-deploy.properties", deployProps, true); } private static void loadOverrideProps(Properties deployProps) { + loadPropsInternal("deploy.properties", deployProps, false); + } + + private static void loadPropsInternal(String propFileName, + Properties deployProps, boolean prtinTrace) + { FileInputStream fis = null; try { - File flnm = new File(getPropertiesPath(), "default-deploy.properties"); + File flnm = new File(getPropertiesPath(), propFileName); fis = new FileInputStream(flnm); deployProps.load(fis); } catch (Exception ex) { - // using all defaults + if (prtinTrace) ex.printStackTrace(); } finally { if (fis != null) { try { @@ -407,214 +538,51 @@ private static int str2int(String argx) { - long l; - - if( argx.trim().equals(Integer.MAX_VALUE) ) return Integer.MAX_VALUE; - if( argx.trim().equals(Integer.MIN_VALUE) ) return Integer.MIN_VALUE; - - l = str2long(argx); - if (l < Integer.MAX_VALUE && l > Integer.MIN_VALUE) { - return (int) l; - } else { - throw new NumberFormatException("Invalid number:"+argx - +" --number out of range"); - } + Number n = null; + try { + //TODO - truncation can occur -- check for overflow + n = numberFormat.parse(argx); + } catch (ParseException e) { + throw new NumberFormatException("Invalid integer: " + argx); + } + return n.intValue(); } private static long str2long(String argx) { - - int minDigitNumBetwnComma = 3; - - String arg = argx.trim(); - arg = arg.replaceAll("\"", ""); // strip all quotes - int sz = arg.length(); - - if( arg.equals("Long.MAX_VALUE") ) return Long.MAX_VALUE; - - if( arg.equals("Long.MIN_VALUE") ) return Long.MIN_VALUE; - - int asterPos = -1; - String arg1 = null; - String arg2 = null; - if( (asterPos = arg.indexOf("*")) != -1) { - int dotPos = -1; - arg1 = arg.substring(0, asterPos).trim(); - int denom1 = 1; - if( (dotPos = arg1.indexOf(".")) != -1) { - StringBuffer tmpBuf = new StringBuffer("1"); - int hitNumber = 0; - for (int i = dotPos + 1; i < (arg1.length() - dotPos); i++) { - if( Character.isDigit(arg1.charAt(i)) ) { - tmpBuf.append("0"); - } else { - break; - } - } - denom1 = Integer.valueOf(tmpBuf.toString()); - arg1 = arg1.substring(0, dotPos) + arg1.substring(dotPos + 1); - } - - arg2 = arg.substring(asterPos + 1).trim(); - int denom2 = 1; - if( (dotPos = arg2.indexOf(".")) != -1) { - StringBuffer tmpBuf = new StringBuffer("1"); - for(int i = dotPos + 1; i <= (arg2.length() - dotPos); i++) { - tmpBuf.append("0"); - } - - denom2 = Integer.valueOf(tmpBuf.toString()); - arg2 = arg2.substring(0, dotPos) + arg2.substring(dotPos + 1); - } - - long numerator = str2long(arg1) * str2long(arg2); - long denom = (denom1 * denom2); - - if (numerator % denom != 0) { - throw new NumberFormatException(" Bad value passed in:" + - ((double) (numerator) / - denom) + - ", expecting a long"); - } - return (numerator / denom); - } - - char unit = arg.charAt(sz - 1); - - String valScalar = arg.substring(0, (sz - 1)).trim(); - - long factor = 0l; - - switch (Character.toUpperCase(unit)) { - - case 'G': - factor = 1000000000l; - break; - case 'M': - factor = 1000000l; - break; - case 'K': - factor = 1000l; - break; - case 'B': - char unitPre = arg.charAt(sz - 2); - if (Character.isDigit(unitPre)) { - factor = -1l; - } else { - factor = - (Character.toUpperCase(unitPre) == - 'G' ? 1000000000l : (Character.toUpperCase(unitPre) == - 'M' ? 1000000l : (Character. - toUpperCase - (unitPre) == - 'K' ? 1000l : - -1l))); - valScalar = arg.substring(0, (sz - 2)).trim(); - } - break; - - default: - if (Character.isDigit(unit)) { - factor = 1l; - valScalar = arg; - } - } - if (factor == -1l) { - throw new NumberFormatException("Invalid number:" + arg); - } - - int comaPos = -1; - if( (comaPos = valScalar.indexOf(',')) != -1) { - if(valScalar.indexOf('.') != -1) { - throw new NumberFormatException("Invalid number:"+arg - +" both \",\" and decimal " - +"point are not supported"); - } - if( comaPos != 0 && comaPos != (valScalar.length() - 1) ) { - String[]spltByComa = valScalar.split(","); - valScalar = ""; - for (int i = spltByComa.length - 1; i >= 0; i--) { - if(i > 0 && spltByComa[i].length() < minDigitNumBetwnComma) - { - throw new NumberFormatException("Invalid number:"+arg - +" unexpected comma " - +"format"); - } - valScalar = spltByComa[i] + valScalar; - } - } else { - throw new NumberFormatException("Invalid number:\"" +arg - +"\" -unexpected comma in " - +"position: "+comaPos); - } - } - - int decimalPos = -1; - String valMultiplByFactor = null; - int numZero = 0; - try { - if( (decimalPos = valScalar.indexOf('.')) != -1) { - if (decimalPos != valScalar.lastIndexOf('.')) { - throw new NumberFormatException("Invalid number:" - +valScalar - +" --invalid decimal " - +"number, bad value"); - } - - String facStr = String.valueOf(factor); - int numZeroFactor = facStr.length() - 1; - int numDigitsAfterDecimal = - valScalar.length() - decimalPos - 1; - int countZero = 0; - for(int i = valScalar.length() - 1; i > decimalPos; i--) { - - if (valScalar.charAt(i) != '0') - break; - --numDigitsAfterDecimal; - countZero++; - } - numZero = numZeroFactor - numDigitsAfterDecimal; - if (numZero == numDigitsAfterDecimal) { - numZero = 0; - } - if(numZero < 0) { - throw new NumberFormatException("Invalid number:" - +valScalar - +" --invalid decimal " - +"number, numzero=" - + numZero); - } - - if(numZero >= 0) { - StringBuffer tmpStrNum = - new StringBuffer(20). - append(valScalar.substring(0, decimalPos)). - append(valScalar.substring(decimalPos + 1, - decimalPos + 1 + - numDigitsAfterDecimal)); - for(int i=0; i<numZero; i++) { - tmpStrNum.append('0'); - } - valMultiplByFactor = tmpStrNum.toString(); - } - - } - } catch(NumberFormatException nfe) { - throw new NumberFormatException("Invalid number:" +valScalar - +" --invalid decimal number, " - +"numZero="+numZero); - } - - long ret = -1l; - - Long ll = ((decimalPos != -1) ? Long.valueOf(valMultiplByFactor) - : (Long.valueOf(valScalar) * factor)); - if( (ret = Long.valueOf(ll)) >= Long.MAX_VALUE - || ret <= Long.MIN_VALUE) - { - throw new NumberFormatException("Invalid number:"+arg - +" --absolute value of number " - +"too big"); - } - return ret; + Number n = null; + try { + //TODO - truncation can occur -- check for overflow + n = numberFormat.parse(argx); + } catch (ParseException e) { + throw new NumberFormatException("Invalid long: " + argx); + } + return n.longValue(); } + + /** + * Returns reference to <code>deploymenyProps</code> field. If null, then the + * field is populated by looking for the default and override properties files + * (defined in <code>loadDefaultProps</code> and <code>loadOverrideProps</code>). + * This method is synchronized in order to ensure that the returned reference is + * a singleton instance. + * Note: This method should be private, but is needed by the unit tests in order + * to access and modify the underlying <code>Properties</code> object. + * @return Properties instance containing the configuration properties. + */ + synchronized static Properties getDeploymentProperties() { + if(deploymentProps == null) { + deploymentProps = new Properties(); + loadDeployProps(deploymentProps); + } + return deploymentProps; + } + + /** + * Convenience method intended for use by unit tests only. + * @param properties Sets <code>Properties</code> object + */ + synchronized static void setDeploymentProperties(Properties properties) { + deploymentProps = properties; + } + } Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/util/config/ConfigurationUtil.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/util/config/ConfigurationUtil.java 2010-10-13 14:18:44 UTC (rev 3786) +++ branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/util/config/ConfigurationUtil.java 2010-10-13 15:08:24 UTC (rev 3787) @@ -28,10 +28,10 @@ import org.apache.log4j.Level; import org.apache.log4j.Logger; -import com.sun.jini.config.ConfigUtil; import net.jini.url.httpmd.HttpmdUtil; import java.io.IOException; +import java.net.UnknownHostException; /** * Utility class that provides a set of static convenience methods @@ -43,6 +43,11 @@ * This class cannot be instantiated. */ public class ConfigurationUtil { + + private ConfigurationUtil() { + //prevent instantiation + throw new AssertionError + ("ConfigurationUtil cannot be instantiated"); } private static final Logger logger = LogUtil.getLog4jLogger( ConfigurationUtil.class ); @@ -95,7 +100,7 @@ * <p> * Note that the <code>name</code> parameter is handled specially by * this method. The value input to that <code>String</code> parameter - * is interpretted in one of two ways by this method: + * is interpreted in one of two ways by this method: * <p><ul> * <li> The name of the local <i>network interface</i> over which the * class server will communicate with clients requesting the @@ -109,7 +114,7 @@ * This method first treats the value of the <code>name</code> parameter * as a network interface, attempting to determine that interface's * corresponding IP address. Should that attempt fail, then this method - * then assumes that the caller intended this parameter to be interpretted + * then assumes that the caller intended this parameter to be interpreted * as an IP address or host name; in which case, this method uses * the value of the parameter as the <i>address/host</i> component of * codebase being constructed. @@ -181,7 +186,7 @@ * any value, including <code>null</code>). * * @throws IllegalArgumentException if the value input for - * <code>port</code> is negtive. + * <code>port</code> is negative. */ public static String computeCodebase(String name, String jarFile, @@ -220,6 +225,10 @@ logger.log(Level.TRACE, name+" - not a valid " +"network interface, assuming host name"); } + if (ipAddr==null) { + throw new UnknownHostException( + "Could not determine IP address for given name:" + name); + } // Construct the codebase, either httpmd or http if(doHttpmd) { Modified: branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/util/config/Log4jLoggingHandler.java =================================================================== --- branches/maven_scaleout/bigdata-core/src/main/java/com/bigdata/util/config/Log4jLoggingHan... [truncated message content] |