Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ACCUMULO-652 merged changes from trunk

git-svn-id: https://svn.apache.org/repos/asf/accumulo/branches/ACCUMULO-652@1438749 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 58fcad6ec19e4c41ab733584c584bf5fe64fbc4f 2 parents 7bfa823 + 2983a1f
Adam Fuchs authored
Showing with 22,770 additions and 8,334 deletions.
  1. +72 −76 .gitignore
  2. +203 −37 LICENSE
  3. +30 −6 README
  4. +1 −1  assemble/build.sh
  5. +92 −92 assemble/dist.xml
  6. +49 −27 assemble/pom.xml
  7. +47 −0 assemble/scripts/gc-only-init.sh
  8. +159 −0 assemble/scripts/init.d/accumulo-gc
  9. +160 −0 assemble/scripts/init.d/accumulo-master
  10. +159 −0 assemble/scripts/init.d/accumulo-monitor
  11. +164 −0 assemble/scripts/init.d/accumulo-slave
  12. +159 −0 assemble/scripts/init.d/accumulo-tracer
  13. +160 −0 assemble/scripts/init.d/accumulo-tserver
  14. +46 −0 assemble/scripts/master-only-init.sh
  15. +45 −0 assemble/scripts/monitor-only-init.sh
  16. +46 −0 assemble/scripts/slave-only-init.sh
  17. +11 −4 examples/wikisearch/ingest/src/main/protobuf/compile_protos.sh → assemble/scripts/stand-alone-init.sh
  18. +45 −0 assemble/scripts/tracer-only-init.sh
  19. +46 −0 assemble/scripts/tserver-only-init.sh
  20. +45 −28 bin/accumulo
  21. +76 −0 bin/bootstrap_hdfs.sh
  22. +12 −9 bin/config.sh
  23. +2 −1  bin/start-all.sh
  24. +26 −15 bin/start-server.sh
  25. +2 −2 bin/stop-all.sh
  26. +21 −5 bin/stop-server.sh
  27. +13 −6 bin/tool.sh
  28. +11 −4 conf/examples/1GB/native-standalone/accumulo-env.sh
  29. +100 −91 conf/examples/1GB/native-standalone/accumulo-site.xml
  30. +2 −6 conf/examples/1GB/native-standalone/generic_logger.xml
  31. +4 −2 conf/examples/1GB/native-standalone/log4j.properties
  32. +2 −2 conf/examples/1GB/native-standalone/monitor_logger.xml
  33. +11 −4 conf/examples/1GB/standalone/accumulo-env.sh
  34. +95 −86 conf/examples/1GB/standalone/accumulo-site.xml
  35. +2 −6 conf/examples/1GB/standalone/generic_logger.xml
  36. +4 −2 conf/examples/1GB/standalone/log4j.properties
  37. +2 −2 conf/examples/1GB/standalone/monitor_logger.xml
  38. +10 −4 conf/examples/2GB/native-standalone/accumulo-env.sh
  39. +90 −81 conf/examples/2GB/native-standalone/accumulo-site.xml
  40. +2 −6 conf/examples/2GB/native-standalone/generic_logger.xml
  41. +4 −2 conf/examples/2GB/native-standalone/log4j.properties
  42. +2 −2 conf/examples/2GB/native-standalone/monitor_logger.xml
  43. +11 −4 conf/examples/2GB/standalone/accumulo-env.sh
  44. +20 −3 conf/examples/2GB/standalone/accumulo-site.xml
  45. +2 −6 conf/examples/2GB/standalone/generic_logger.xml
  46. +4 −2 conf/examples/2GB/standalone/log4j.properties
  47. +2 −2 conf/examples/2GB/standalone/monitor_logger.xml
  48. +10 −4 conf/examples/3GB/native-standalone/accumulo-env.sh
  49. +85 −76 conf/examples/3GB/native-standalone/accumulo-site.xml
  50. +2 −6 conf/examples/3GB/native-standalone/generic_logger.xml
  51. +4 −2 conf/examples/3GB/native-standalone/log4j.properties
  52. +2 −2 conf/examples/3GB/native-standalone/monitor_logger.xml
  53. +10 −4 conf/examples/3GB/standalone/accumulo-env.sh
  54. +85 −76 conf/examples/3GB/standalone/accumulo-site.xml
  55. +2 −6 conf/examples/3GB/standalone/generic_logger.xml
  56. +4 −2 conf/examples/3GB/standalone/log4j.properties
  57. +2 −2 conf/examples/3GB/standalone/monitor_logger.xml
  58. +10 −4 conf/examples/512MB/native-standalone/accumulo-env.sh
  59. +95 −86 conf/examples/512MB/native-standalone/accumulo-site.xml
  60. +2 −6 conf/examples/512MB/native-standalone/generic_logger.xml
  61. +4 −2 conf/examples/512MB/native-standalone/log4j.properties
  62. +2 −2 conf/examples/512MB/native-standalone/monitor_logger.xml
  63. +10 −4 conf/examples/512MB/standalone/accumulo-env.sh
  64. +104 −87 conf/examples/512MB/standalone/accumulo-site.xml
  65. +2 −6 conf/examples/512MB/standalone/generic_logger.xml
  66. +4 −2 conf/examples/512MB/standalone/log4j.properties
  67. +2 −2 conf/examples/512MB/standalone/monitor_logger.xml
  68. +116 −0 conf/examples/vfs-classloader/accumulo-site.xml
  69. +1 −1  contrib/Eclipse-Accumulo-Codestyle.xml
  70. +3 −5 contrib/Eclipse-Accumulo-Template.xml
  71. +80 −0 contrib/findbugs_build.xml
  72. +3 −0  contrib/run_findbugs.sh
  73. +52 −8 core/pom.xml
  74. +20 −10 core/src/main/java/org/apache/accumulo/core/Constants.java
  75. +8 −9 core/src/main/java/org/apache/accumulo/core/bloomfilter/BloomFilter.java
  76. +8 −8 core/src/main/java/org/apache/accumulo/core/bloomfilter/DynamicBloomFilter.java
  77. +6 −6 core/src/main/java/org/apache/accumulo/core/bloomfilter/Filter.java
  78. +30 −0 core/src/main/java/org/apache/accumulo/core/cli/BatchScannerOpts.java
  79. +50 −0 core/src/main/java/org/apache/accumulo/core/cli/BatchWriterOpts.java
  80. +52 −0 core/src/main/java/org/apache/accumulo/core/cli/ClientOnDefaultTable.java
  81. +40 −0 core/src/main/java/org/apache/accumulo/core/cli/ClientOnRequiredTable.java
  82. +227 −0 core/src/main/java/org/apache/accumulo/core/cli/ClientOpts.java
  83. +45 −0 core/src/main/java/org/apache/accumulo/core/cli/Help.java
  84. +6 −14 ...kisearch/normalizer/Normalizer.java → core/src/main/java/org/apache/accumulo/core/cli/ScannerOpts.java
  85. +3 −3 core/src/main/java/org/apache/accumulo/core/client/AccumuloException.java
  86. +20 −4 core/src/main/java/org/apache/accumulo/core/client/AccumuloSecurityException.java
  87. +16 −0 core/src/main/java/org/apache/accumulo/core/client/BatchScanner.java
  88. +8 −0 core/src/main/java/org/apache/accumulo/core/client/BatchWriter.java
  89. +224 −0 core/src/main/java/org/apache/accumulo/core/client/BatchWriterConfig.java
  90. +28 −19 core/src/main/java/org/apache/accumulo/core/client/ClientSideIteratorScanner.java
  91. +57 −0 core/src/main/java/org/apache/accumulo/core/client/Connector.java
  92. +38 −0 core/src/main/java/org/apache/accumulo/core/client/Instance.java
  93. +18 −9 core/src/main/java/org/apache/accumulo/core/client/IsolatedScanner.java
  94. +36 −1 core/src/main/java/org/apache/accumulo/core/client/IteratorSetting.java
  95. +11 −8 core/src/main/java/org/apache/accumulo/core/client/MutationsRejectedException.java
  96. +4 −0 core/src/main/java/org/apache/accumulo/core/client/Scanner.java
  97. +19 −0 core/src/main/java/org/apache/accumulo/core/client/ScannerBase.java
  98. +54 −0 core/src/main/java/org/apache/accumulo/core/client/TimedOutException.java
  99. +63 −4 core/src/main/java/org/apache/accumulo/core/client/ZooKeeperInstance.java
  100. +184 −0 core/src/main/java/org/apache/accumulo/core/client/admin/ActiveCompaction.java
  101. +17 −0 core/src/main/java/org/apache/accumulo/core/client/admin/ActiveScan.java
  102. +1 −1  core/src/main/java/org/apache/accumulo/core/client/admin/FindMax.java
  103. +21 −0 core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperations.java
  104. +84 −55 core/src/main/java/org/apache/accumulo/core/client/admin/InstanceOperationsImpl.java
  105. +56 −0 core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperations.java
  106. +131 −51 core/src/main/java/org/apache/accumulo/core/client/admin/SecurityOperationsImpl.java
  107. +31 −0 core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java
  108. +3 −3 core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsHelper.java
  109. +115 −34 core/src/main/java/org/apache/accumulo/core/client/admin/TableOperationsImpl.java
  110. +2 −2 core/src/main/java/org/apache/accumulo/core/client/impl/AccumuloServerException.java
  111. +5 −4 core/src/main/java/org/apache/accumulo/core/client/impl/BatchWriterImpl.java
  112. +62 −33 core/src/main/java/org/apache/accumulo/core/client/impl/ConnectorImpl.java
  113. +8 −8 core/src/main/java/org/apache/accumulo/core/client/impl/MasterClient.java
  114. +15 −11 core/src/main/java/org/apache/accumulo/core/client/impl/MetadataLocationObtainer.java
  115. +4 −3 core/src/main/java/org/apache/accumulo/core/client/impl/MultiTableBatchWriterImpl.java
  116. +26 −25 core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
  117. +24 −22 core/src/main/java/org/apache/accumulo/core/client/impl/ScannerImpl.java
  118. +3 −3 core/src/main/java/org/apache/accumulo/core/client/impl/ScannerIterator.java
  119. +20 −0 core/src/main/java/org/apache/accumulo/core/client/impl/ScannerOptions.java
  120. +25 −19 core/src/main/java/org/apache/accumulo/core/client/impl/ServerClient.java
  121. +27 −3 core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocator.java
  122. +18 −7 core/src/main/java/org/apache/accumulo/core/client/impl/TabletLocatorImpl.java
  123. +8 −11 core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchDeleter.java
  124. +4 −4 core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReader.java
  125. +133 −25 core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
  126. +143 −34 core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
  127. +0 −1  core/src/main/java/org/apache/accumulo/core/client/impl/TabletType.java
  128. +41 −37 core/src/main/java/org/apache/accumulo/core/client/impl/ThriftScanner.java
  129. +2 −2 core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java
  130. +136 −0 core/src/main/java/org/apache/accumulo/core/client/impl/TimeoutTabletLocator.java
  131. +11 −10 core/src/main/java/org/apache/accumulo/core/client/impl/Writer.java
  132. +6,909 −4,372 core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ClientService.java
  133. +19 −2 core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ConfigurationType.java
  134. +26 −3 core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperation.java
  135. +19 −2 core/src/main/java/org/apache/accumulo/core/client/impl/thrift/TableOperationExceptionType.java
  136. +219 −92 core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTableOperationException.java
  137. +2,255 −0 core/src/main/java/org/apache/accumulo/core/client/impl/thrift/ThriftTest.java
  138. +178 −0 core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormat.java
  139. +82 −0 core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloInputFormat.java
  140. +477 −0 core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java
  141. +85 −0 core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloRowInputFormat.java
  142. +805 −0 core/src/main/java/org/apache/accumulo/core/client/mapred/InputFormatBase.java
  143. +151 −58 core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java
  144. +12 −8 core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormat.java
  145. +388 −163 core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java
  146. +19 −0 core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloRowInputFormat.java
  147. +623 −562 core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java
  148. +3 −3 core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/KeyRangePartitioner.java
  149. +4 −3 core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/partition/RangePartitioner.java
  150. +228 −0 core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/ConfiguratorBase.java
  151. +187 −0 core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/FileOutputConfigurator.java
  152. +529 −0 core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/InputConfigurator.java
  153. +204 −0 core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/OutputConfigurator.java
  154. +34 −0 core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/package-info.java
  155. +10 −0 core/src/main/java/org/apache/accumulo/core/client/mock/MockAccumulo.java
  156. +1 −21 core/src/main/java/org/apache/accumulo/core/client/mock/MockBatchScanner.java
  157. +29 −4 core/src/main/java/org/apache/accumulo/core/client/mock/MockConnector.java
  158. +71 −10 core/src/main/java/org/apache/accumulo/core/client/mock/MockInstance.java
  159. +24 −2 core/src/main/java/org/apache/accumulo/core/client/mock/MockInstanceOperations.java
  160. +11 −3 core/src/main/java/org/apache/accumulo/core/client/mock/MockScanner.java
  161. +61 −6 core/src/main/java/org/apache/accumulo/core/client/mock/MockSecurityOperations.java
  162. +14 −5 core/src/main/java/org/apache/accumulo/core/client/mock/MockTable.java
  163. +134 −12 core/src/main/java/org/apache/accumulo/core/client/mock/MockTableOperations.java
  164. +1 −0  core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java
  165. +1 −1  core/src/main/java/org/apache/accumulo/core/conf/DefaultConfiguration.java
  166. +78 −46 core/src/main/java/org/apache/accumulo/core/conf/Property.java
  167. +9 −3 core/src/main/java/org/apache/accumulo/core/conf/PropertyType.java
  168. +2 −2 core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
  169. +25 −18 core/src/main/java/org/apache/accumulo/core/data/ColumnUpdate.java
  170. +2 −3 core/src/main/java/org/apache/accumulo/core/data/KeyExtent.java
  171. +247 −70 core/src/main/java/org/apache/accumulo/core/data/Mutation.java
  172. +3 −4 core/src/main/java/org/apache/accumulo/core/data/PartialKey.java
  173. +1 −1  core/src/main/java/org/apache/accumulo/core/data/Range.java
  174. +3 −2 core/src/main/java/org/apache/accumulo/core/data/Value.java
  175. +156 −60 core/src/main/java/org/apache/accumulo/core/data/thrift/InitialMultiScan.java
  176. +156 −60 core/src/main/java/org/apache/accumulo/core/data/thrift/InitialScan.java
  177. +175 −72 core/src/main/java/org/apache/accumulo/core/data/thrift/IterInfo.java
  178. +127 −46 core/src/main/java/org/apache/accumulo/core/data/thrift/MapFileInfo.java
  179. +425 −204 core/src/main/java/org/apache/accumulo/core/data/thrift/MultiScanResult.java
  180. +185 −77 core/src/main/java/org/apache/accumulo/core/data/thrift/ScanResult.java
  181. +170 −65 core/src/main/java/org/apache/accumulo/core/data/thrift/TColumn.java
  182. +201 −88 core/src/main/java/org/apache/accumulo/core/data/thrift/TConstraintViolationSummary.java
  183. +223 −98 core/src/main/java/org/apache/accumulo/core/data/thrift/TKey.java
  184. +170 −65 core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyExtent.java
  185. +151 −53 core/src/main/java/org/apache/accumulo/core/data/thrift/TKeyValue.java
  186. +231 −102 core/src/main/java/org/apache/accumulo/core/data/thrift/TMutation.java
  187. +263 −122 core/src/main/java/org/apache/accumulo/core/data/thrift/TRange.java
  188. +306 −139 core/src/main/java/org/apache/accumulo/core/data/thrift/UpdateErrors.java
  189. +9 −9 core/src/main/java/org/apache/accumulo/core/file/BloomFilterLayer.java
  190. +1 −1  core/src/main/java/org/apache/accumulo/core/file/FileUtil.java
  191. +16 −0 core/src/main/java/org/apache/accumulo/core/file/blockfile/ABlockReader.java
  192. +10 −3 core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCache.java
  193. +4 −33 core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/CacheEntry.java
  194. +14 −1 core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/CachedBlock.java
  195. +8 −5 core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java
  196. +45 −9 core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/SimpleBlockCache.java
  197. +123 −17 core/src/main/java/org/apache/accumulo/core/file/blockfile/impl/CachableBlockFile.java
Sorry, we could not display the entire diff because too many files (1,068) changed.
View
148 .gitignore
@@ -14,6 +14,7 @@
# limitations under the License.
# /
+*.pyc
/logs
/walogs
/target
@@ -70,82 +71,73 @@
/lib/native
/lib/*.jar
-# /src/assemble/
-/src/assemble/target
-/src/assemble/.settings
-/src/assemble/.project
-
-# /src/core/
-/src/core/target
-/src/core/.settings
-/src/core/.project
-/src/core/.classpath
-
-# /src/examples/
-/src/examples/target
-/src/examples/.settings
-/src/examples/.classpath
-/src/examples/.project
-
-# /src/examples/simple/
-/src/examples/simple/target
-/src/examples/simple/.classpath
-/src/examples/simple/.project
-/src/examples/simple/.settings/
-
-
-# /src/examples/wikisearch/
-/src/examples/wikisearch/target
-/src/examples/wikisearch/.project
-/src/examples/wikisearch/.settings/
-
-# /src/examples/wikisearch/ingest/
-/src/examples/wikisearch/ingest/target
-/src/examples/wikisearch/ingest/lib
-/src/examples/wikisearch/ingest/.classpath
-/src/examples/wikisearch/ingest/.project
-/src/examples/wikisearch/ingest/.settings/
-
-
-# /src/examples/wikisearch/query/
-/src/examples/wikisearch/query/lib
-/src/examples/wikisearch/query/target
-/src/examples/wikisearch/query/.classpath
-/src/examples/wikisearch/query/.project
-/src/examples/wikisearch/query/.settings/
-
-
-# /src/examples/wikisearch/query-war/
-/src/examples/wikisearch/query-war/target
-/src/examples/wikisearch/query-war/.classpath
-/src/examples/wikisearch/query-war/.project
-/src/examples/wikisearch/query-war/.settings/
-
-
-# /src/server/
-/src/server/target
-/src/server/.project
-/src/server/.settings
-/src/server/.classpath
-
-# /src/server/src/main/c++/mlock/
-/src/server/src/main/c++/mlock/*.jnilib
-/src/server/src/main/c++/mlock/org_apache_accumulo_server_tabletserver_MLock.h
-
-# /src/server/src/main/c++/nativeMap/
-/src/server/src/main/c++/nativeMap/*.jnilib
-
-# /src/start/
-/src/start/target
-/src/start/.classpath
-/src/start/.project
-/src/start/.settings
-
-# /src/trace/
-/src/trace/target
-/src/trace/.classpath
-/src/trace/.project
-/src/trace/.settings
+# /assemble/
+/assemble/target
+/assemble/.settings
+/assemble/.project
+
+# /core/
+/core/target
+/core/.settings
+/core/.project
+/core/.classpath
+
+# /examples/
+/examples/lib
+/examples/target
+/examples/.settings
+/examples/.classpath
+/examples/.project
+
+# /examples/instamo/
+/examples/instamo/target
+/examples/instamo/.classpath
+/examples/instamo/.project
+/examples/instamo/.settings/
+
+
+# /examples/simple/
+/examples/simple/target
+/examples/simple/.classpath
+/examples/simple/.project
+/examples/simple/.settings/
+
+# /fate/
+/fate/target
+/fate/.settings
+/fate/.classpath
+/fate/.project
+
+# /server/
+/server/target
+/server/.project
+/server/.settings
+/server/.classpath
+
+# /server/src/main/c++/mlock/
+/server/src/main/c++/mlock/*.jnilib
+/server/src/main/c++/mlock/org_apache_accumulo_server_tabletserver_MLock.h
+
+# /server/src/main/c++/nativeMap/
+/server/src/main/c++/nativeMap/*.jnilib
+
+# /start/
+/start/target
+/start/.classpath
+/start/.project
+/start/.settings
+
+# /trace/
+/trace/target
+/trace/.classpath
+/trace/.project
+/trace/.settings
+
+# /test/
+/test/target
+/test/.classpath
+/test/.project
+/test/.settings
# /test/system/auto/
/test/system/auto/*.pyc
@@ -161,3 +153,7 @@
/test/system/continuous/continuous-env.sh
/test/system/continuous/walkers.txt
/test/system/continuous/ingesters.txt
+
+# JetBrains IDE
+.idea
+*.iml
View
240 LICENSE
@@ -328,43 +328,6 @@ For the jline library:
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
-For the kryo and minlog libraries:
-
- The BSD License
-
- Copyright (c) 2008, Nathan Sweet
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or
- without modification, are permitted provided that the following
- conditions are met:
-
- Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer
- in the documentation and/or other materials provided with
- the distribution.
-
- Neither the name of Esoteric Software nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
- BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- OF THE POSSIBILITY OF SUCH DAMAGE.
-
For the protobuf library:
The BSD License
@@ -1006,3 +969,206 @@ For the jersey-server runtime dependency:
state courts of the State of California, with venue lying in Santa Clara
County, California.
+For JCommander:
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright 2012, Cedric Beust
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
View
36 README
@@ -15,9 +15,17 @@ ready to go on x86 GNU/Linux: there is no build step.
However, if you only have source code, or you wish to make changes, you need to
have maven configured to get Accumulo prerequisites from repositories. See
-the pom.xml file for the necessary components.
-
-Run "mvn package -P assemble"
+the pom.xml file for the necessary components. Activate the 'docs' profile to build
+the Accumulo developer and user manual.
+
+Run "mvn package -P assemble" to build a distribution, or run
+"mvn package -P assemble,docs" to also build the documentation. By default,
+Accumulo compiles against Hadoop 1.0.4. To compile against a different version
+that is compatible with Hadoop 1.0, specify hadoop.version on the command line,
+e.g. "-Dhadoop.version=0.20.205.0" or "-Dhadoop.version=1.1.0". To compile
+against Hadoop 2.0, specify "-Dhadoop.profile=2.0". By default this uses
+2.0.2-alpha. To compile against a different 2.0-compatible version, specify
+the profile and version, e.g. "-Dhadoop.profile=2.0 -Dhadoop.version=0.23.5".
If you are running on another Unix-like operating system (OSX, etc) then
you may wish to build the native libraries. They are not strictly necessary
@@ -52,7 +60,7 @@ There are no steps for upgrading from 1.3 to 1.4.
Apache Accumulo has two prerequisites, hadoop and zookeeper. Zookeeper must be
at least version 3.3.0. Both of these must be installed and configured.
Zookeeper normally only allows for 10 connections from one computer. On a
-single-host install, this number is a little two low. Add the following to the
+single-host install, this number is a little too low. Add the following to the
$ZOOKEEPER_HOME/conf/zoo.cfg file:
maxClientCnxns=100
@@ -62,8 +70,24 @@ the machines in the cluster and that hadoop and accumulo install files can be
found in the same location on every machine in the cluster. You will need to
have password-less ssh set up as described in the hadoop documentation.
-You will need to have hadoop installed and configured on your system.
-Accumulo ACCUMULO-652-SNAPSHOT has been tested with hadoop version 0.20.2.
+You will need to have hadoop installed and configured on your system. Accumulo
+ACCUMULO-652-SNAPSHOT has been tested with hadoop version 0.20.2. To avoid
+data loss, you must enable HDFS durable sync. How you enable this depends on
+your version of Hadoop. Please consult the table below for information
+regarding your version. If you need to set the coniguration, please be sure to
+restart HDFS. See ACCUMULO-623 for more information.
+
+HADOOP RELEASE VERSION SYNC NAME DEFAULT
+Apache Hadoop 0.20.205 dfs.support.append false
+Apache Hadoop 0.23.x dfs.support.append true
+Apache Hadoop 1.0.x dfs.support.append false
+Apache Hadoop 1.1.x dfs.durable.sync true
+Apache Hadoop 2.0.0-2.0.2 dfs.support.append true
+Cloudera CDH 3u0-3u3 ???? true
+Cloudera CDH 3u4 dfs.support.append true
+Hortonworks HDP `1.0 dfs.support.append false
+Hortonworks HDP `1.1 dfs.support.append false
+
The example accumulo configuration files are placed in directories based on the
memory footprint for the accumulo processes. If you are using native libraries
View
2  assemble/build.sh
@@ -41,7 +41,7 @@ runAt() {
run mvn -U clean
mvn rat:check
COUNT=`grep '!????' target/rat.txt | wc -l`
-EXPECTED=55
+EXPECTED=53
if [ "$COUNT" -ne $EXPECTED ]
then
fail expected $EXPECTED files missing licenses, but saw "$COUNT"
View
184 assemble/dist.xml
@@ -1,97 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- You under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of
- the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
- by applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied. See the License for the specific
- language governing permissions and limitations under the License. -->
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ You under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
<assembly>
- <id>dist</id>
- <formats>
- <format>tar.gz</format>
- </formats>
- <baseDirectory>accumulo-${project.version}</baseDirectory>
- <fileSets>
- <fileSet>
- <directory>../bin</directory>
- <fileMode>0755</fileMode>
- <directoryMode>0755</directoryMode>
- </fileSet>
- <fileSet>
- <directory>../logs</directory>
- <directoryMode>0700</directoryMode>
- <excludes>
- <exclude>*</exclude>
- </excludes>
- </fileSet>
- <fileSet>
- <directory>../walogs</directory>
- <directoryMode>0700</directoryMode>
- <excludes>
- <exclude>*</exclude>
- </excludes>
- </fileSet>
- <fileSet>
- <directory>../</directory>
- <fileMode>0755</fileMode>
- <directoryMode>0755</directoryMode>
- <includes>
- <include>**/*.py</include>
- <include>**/*.pl</include>
- <include>**/*.sh</include>
- <include>${so}</include>
- </includes>
- <excludes>
- <exclude>**/target</exclude>
- <exclude>conf/accumulo-env.sh</exclude>
- <exclude>**/continuous-env.sh</exclude>
- <exclude>**bin/**</exclude>
- <exclude>logs/**</exclude>
- <exclude>walogs/**</exclude>
- <exclude>**.*</exclude>
- </excludes>
- </fileSet>
- <fileSet>
- <directory>../</directory>
- <excludes>
- <!-- the following ignored because they were included above -->
- <exclude>**/*.py</exclude>
- <exclude>**/*.pl</exclude>
- <exclude>**/*.sh</exclude>
- <exclude>walogs/**</exclude>
- <exclude>logs/**</exclude>
- <exclude>bin/**</exclude>
+ <id>dist</id>
+ <formats>
+ <format>tar.gz</format>
+ </formats>
+ <baseDirectory>accumulo-${project.version}</baseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>../bin</directory>
+ <fileMode>0755</fileMode>
+ <directoryMode>0755</directoryMode>
+ </fileSet>
+ <fileSet>
+ <directory>../logs</directory>
+ <directoryMode>0700</directoryMode>
+ <excludes>
+ <exclude>*</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>../walogs</directory>
+ <directoryMode>0700</directoryMode>
+ <excludes>
+ <exclude>*</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>../</directory>
+ <fileMode>0755</fileMode>
+ <directoryMode>0755</directoryMode>
+ <includes>
+ <include>**/*.py</include>
+ <include>**/*.pl</include>
+ <include>**/*.sh</include>
+ <include>**/*.example</include>
+ <include>${so}</include>
+ </includes>
+ <excludes>
+ <exclude>**/target</exclude>
+ <exclude>conf/accumulo-env.sh</exclude>
+ <exclude>**/continuous-env.sh</exclude>
+ <exclude>**bin/**</exclude>
+ <exclude>logs/**</exclude>
+ <exclude>walogs/**</exclude>
+ <exclude>**.*</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>../</directory>
+ <excludes>
+ <!-- the following ignored because they were included above -->
+ <exclude>**/*.py</exclude>
+ <exclude>**/*.pl</exclude>
+ <exclude>**/*.sh</exclude>
+ <exclude>walogs/**</exclude>
+ <exclude>logs/**</exclude>
+ <exclude>bin/**</exclude>
+ <!-- the following directories ignored because they should not be in
+ the tarball -->
+ <exclude>**/.*/**</exclude>
+ <exclude>**/target/**</exclude>
- <!-- the following directories ignored because they should not be in
- the tarball -->
- <exclude>**/.*/**</exclude>
- <exclude>**/target/**</exclude>
-
- <!-- the following files ignored because they should not be in the tarball -->
- <exclude>**/.*</exclude>
- <exclude>conf/accumulo-site.xml</exclude>
- <exclude>conf/accumulo-metrics.xml</exclude>
- <exclude>**/test-*</exclude>
- <exclude>conf/slaves</exclude>
- <exclude>conf/masters</exclude>
- <exclude>conf/monitor</exclude>
- <exclude>conf/tracers</exclude>
- <exclude>conf/gc</exclude>
- <exclude>**/walkers.txt</exclude>
- <exclude>**/ingesters.txt</exclude>
- <exclude>**/*.pyc</exclude>
- <exclude>**/randomwalk/conf/logger.xml</exclude>
- <exclude>**/randomwalk/conf/randomwalk.conf</exclude>
- <exclude>**/randomwalk/conf/walkers</exclude>
- <exclude>${so}</exclude>
- <exclude>${jnilib}</exclude>
- </excludes>
- <fileMode>0644</fileMode>
- <directoryMode>0755</directoryMode>
- </fileSet>
- </fileSets>
+ <!-- the following files ignored because they should not be in the tarball -->
+ <exclude>**/.*</exclude>
+ <exclude>conf/accumulo-site.xml</exclude>
+ <exclude>conf/accumulo-metrics.xml</exclude>
+ <exclude>**/test-*</exclude>
+ <exclude>conf/slaves</exclude>
+ <exclude>conf/masters</exclude>
+ <exclude>conf/monitor</exclude>
+ <exclude>conf/tracers</exclude>
+ <exclude>conf/gc</exclude>
+ <exclude>**/walkers.txt</exclude>
+ <exclude>**/ingesters.txt</exclude>
+ <exclude>**/*.pyc</exclude>
+ <exclude>**/randomwalk/conf/logger.xml</exclude>
+ <exclude>**/randomwalk/conf/randomwalk.conf</exclude>
+ <exclude>**/randomwalk/conf/walkers</exclude>
+ <exclude>${so}</exclude>
+ <exclude>${jnilib}</exclude>
+ </excludes>
+ <fileMode>0644</fileMode>
+ <directoryMode>0755</directoryMode>
+ </fileSet>
+ </fileSets>
</assembly>
View
76 assemble/pom.xml
@@ -45,11 +45,6 @@
</dependency>
<dependency>
<groupId>org.apache.accumulo</groupId>
- <artifactId>wikisearch-query-war</artifactId>
- <type>war</type>
- </dependency>
- <dependency>
- <groupId>org.apache.accumulo</groupId>
<artifactId>cloudtrace</artifactId>
</dependency>
</dependencies>
@@ -61,19 +56,6 @@
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
- <id>user-manual</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>bash</executable>
- <arguments>
- <argument>../docs/src/user_manual/build.sh</argument>
- </arguments>
- </configuration>
- </execution>
- <execution>
<id>config webpage</id>
<phase>package</phase>
<goals>
@@ -278,15 +260,7 @@
<type>perm</type>
<prefix>/usr/lib/accumulo/lib</prefix>
</mapper>
- <excludes>**/.svn/**</excludes>
- </data>
- <data>
- <src>${accumulo-top}/NOTICE</src>
- <type>file</type>
- <mapper>
- <type>perm</type>
- <prefix>/usr/lib/accumulo</prefix>
- </mapper>
+ <excludes>**/.svn/**,**/lib/native/**</excludes>
</data>
<data>
<src>${accumulo-top}/NOTICE</src>
@@ -340,6 +314,15 @@
</mapper>
<excludes>**/.svn/**,**/accumulo-site.xml,**/accumulo-env.sh,**/accumulo-metrics.xml,**/test-*,**/slaves,**/masters,**/tracers,**/gc,**/monitor</excludes>
</data>
+ <data>
+ <src>${accumulo-top}/conf/examples</src>
+ <type>directory</type>
+ <mapper>
+ <type>perm</type>
+ <prefix>/usr/lib/accumulo/conf/examples</prefix>
+ </mapper>
+ <excludes>**/.svn/**</excludes>
+ </data>
</dataSet>
</configuration>
</execution>
@@ -412,5 +395,44 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>docs</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>developer-manual</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>bash</executable>
+ <arguments>
+ <argument>../docs/src/developer_manual/build.sh</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <execution>
+ <id>user-manual</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>bash</executable>
+ <arguments>
+ <argument>../docs/src/user_manual/build.sh</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
View
47 assemble/scripts/gc-only-init.sh
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+if [ ! -f /etc/default/accumulo ]; then
+ mkdir -p /etc/default
+ touch /etc/default/accumulo
+fi
+
+if ! grep "ACCUMULO_USER=" /etc/default/accumulo >> /dev/null ; then
+ echo "ACCUMULO_USER=accumulo" >> /etc/default/accumulo
+fi
+
+if ! id -u accumulo >/dev/null 2>&1; then
+ groupArg="U"
+ if egrep "^accumulo:" /etc/group >> /dev/null; then
+ groupArg="g accumulo"
+ fi
+ useradd -$groupArg -d /usr/lib/accumulo accumulo
+fi
+
+install -m 0755 -o root -g root init.d/accumulo-gc /etc/init.d/
+
+if [ -e "`which update-rc.d`" ]; then
+ update-rc.d accumulo-gc start 21 2 3 4 5 . stop 20 0 1 6 .
+elif [ -e "`which chkconfig`" ]; then
+ chkconfig --add accumulo-gc
+else
+ echo "No update-rc.d or chkconfig, rc levels not set for accumulo-gc"
+fi
View
159 assemble/scripts/init.d/accumulo-gc
@@ -0,0 +1,159 @@
+#! /bin/sh
+# chkconfig: 2345 21 20
+### BEGIN INIT INFO
+# Provides: accumulo-gc
+# Required-Start: $network $local_fs
+# Required-Stop: $network $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: accumulo garbage collector process
+# Description: The accumulo garbage collector handles cleanup of old walogs and files in hdfs
+### END INIT INFO
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Do NOT "set -e"
+install -d -m 0775 -o root -g accumulo /var/run/accumulo
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/accumulo/bin
+DESC="Accumulo Garbage Collector"
+NAME=accumulo-gc
+ACCUMULO_PROC=gc
+DAEMON=/usr/lib/accumulo/bin/start-server.sh
+IP=`ifconfig | grep inet[^6] | awk '{print $2}' | sed 's/addr://' | grep -v 0.0.0.0 | grep -v 127.0.0.1 | head -n 1`
+DAEMON_ARGS="$IP gc \"garbage collector\""
+PIDFILE=/var/run/accumulo/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Read configuration variable file if it is present
+[ -r /etc/default/accumulo ] && . /etc/default/accumulo
+
+# Load the VERBOSE setting and other rcS variables
+if [ -f /lib/init/vars.sh ]; then
+ . /lib/init/vars.sh
+else
+ log_daemon_msg() { logger "$@"; }
+ log_end_msg() { [ $1 -eq 0 ] && RES=OK; logger ${RES:=FAIL}; }
+fi
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start() {
+ TARGET_USER_NAME="ACCUMULO_USER"
+ TARGET_USER=$(eval "echo \$$TARGET_USER_NAME")
+
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ su -s /bin/sh $TARGET_USER -c "$DAEMON $DAEMON_ARGS > /dev/null || return 1"
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 0; fi
+ return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+
+ if [ ! "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ jps -m | grep $ACCUMULO_PROC | awk '{print $1}' | xargs kill -9
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 2; fi
+
+ return 0;
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
View
160 assemble/scripts/init.d/accumulo-master
@@ -0,0 +1,160 @@
+#! /bin/sh
+# chkconfig: 2345 21 19
+### BEGIN INIT INFO
+# Provides: accumulo-master
+# Required-Start: $network $local_fs hadoop-namenode zookeeper-server
+# Required-Stop: $network $local_fs accumulo-slave
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: accumulo master process
+# Description: The accumulo master manages tablet assignment and balance to accumulo
+### END INIT INFO
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Do NOT "set -e"
+install -d -m 0775 -o root -g accumulo /var/run/accumulo
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/accumulo/bin
+DESC="Accumulo Master"
+NAME=accumulo-master
+ACCUMULO_PROC=master
+DAEMON=/usr/lib/accumulo/bin/start-server.sh
+IP=`ifconfig | grep inet[^6] | awk '{print $2}' | sed 's/addr://' | grep -v 0.0.0.0 | grep -v 127.0.0.1 | head -n 1`
+DAEMON_ARGS="$IP master"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Read configuration variable file if it is present
+[ -r /etc/default/accumulo ] && . /etc/default/accumulo
+
+# Load the VERBOSE setting and other rcS variables
+if [ -f /lib/init/vars.sh ]; then
+ . /lib/init/vars.sh
+else
+ log_daemon_msg() { logger "$@"; }
+ log_end_msg() { [ $1 -eq 0 ] && RES=OK; logger ${RES:=FAIL}; }
+fi
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ TARGET_USER_NAME="ACCUMULO_USER"
+ TARGET_USER=$(eval "echo \$$TARGET_USER_NAME")
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ su -s /bin/sh $TARGET_USER -c "/usr/lib/accumulo/bin/accumulo org.apache.accumulo.server.master.state.SetGoalState NORMAL"
+ su -s /bin/sh $TARGET_USER -c "$DAEMON $DAEMON_ARGS > /dev/null || return 1"
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 0; fi
+ return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+
+ if [ ! "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ jps -m | grep $ACCUMULO_PROC | awk '{print $1}' | xargs kill -9
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 2; fi
+
+ return 0;
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
View
159 assemble/scripts/init.d/accumulo-monitor
@@ -0,0 +1,159 @@
+#! /bin/sh
+# chkconfig: 2345 21 20
+### BEGIN INIT INFO
+# Provides: accumulo-monitor
+# Required-Start: $network $local_fs
+# Required-Stop: $network $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: accumulo monitor process on 50095
+# Description: The accumulo monitor provides a convenient mechanism for monitoring accumulo
+### END INIT INFO
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Do NOT "set -e"
+install -d -m 0775 -o root -g accumulo /var/run/accumulo
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/accumulo/bin
+DESC="Accumulo Monitor"
+NAME=accumulo-monitor
+ACCUMULO_PROC=monitor
+DAEMON=/usr/lib/accumulo/bin/start-server.sh
+IP=`ifconfig | grep inet[^6] | awk '{print $2}' | sed 's/addr://' | grep -v 0.0.0.0 | grep -v 127.0.0.1 | head -n 1`
+DAEMON_ARGS="$IP monitor"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Read configuration variable file if it is present
+[ -r /etc/default/accumulo ] && . /etc/default/accumulo
+
+# Load the VERBOSE setting and other rcS variables
+if [ -f /lib/init/vars.sh ]; then
+ . /lib/init/vars.sh
+else
+ log_daemon_msg() { logger "$@"; }
+ log_end_msg() { [ $1 -eq 0 ] && RES=OK; logger ${RES:=FAIL}; }
+fi
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ TARGET_USER_NAME="ACCUMULO_MONITOR_USER"
+ TARGET_USER=$(eval "echo \$$TARGET_USER_NAME")
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ su -s /bin/sh $TARGET_USER -c "$DAEMON $DAEMON_ARGS > /dev/null || return 1"
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 0; fi
+ return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+
+ if [ ! "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ jps -m | grep $ACCUMULO_PROC | awk '{print $1}' | xargs kill -9
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 2; fi
+
+ return 0;
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
View
164 assemble/scripts/init.d/accumulo-slave
@@ -0,0 +1,164 @@
+#! /bin/sh
+# chkconfig: 2345 21 15
+### BEGIN INIT INFO
+# Provides: accumulo-slave
+# Required-Start: $network $local_fs hadoop-namenode hadoop-datanode zookeeper-server accumulo-master
+# Required-Stop: $network $local_fs hadoop-datanode hadoop-namenode zookeeper-server accumulo-master
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: accumulo tserver and logger processes
+# Description: The accumulo slaves bundle the tserver and logger processes for accumulo
+### END INIT INFO
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Do NOT "set -e"
+install -d -m 0775 -o root -g accumulo /var/run/accumulo
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/accumulo/bin
+DESC="Accumulo Slave"
+NAME=accumulo-slave
+ACCUMULO_PROC1=tserver
+ACCUMULO_PROC2=logger
+DAEMON=/usr/lib/accumulo/bin/start-server.sh
+IP=`ifconfig | grep inet[^6] | awk '{print $2}' | sed 's/addr://' | grep -v 0.0.0.0 | grep -v 127.0.0.1 | head -n 1`
+DAEMON_ARGS="$IP slaves"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Read configuration variable file if it is present
+[ -r /etc/default/accumulo ] && . /etc/default/accumulo
+
+# Load the VERBOSE setting and other rcS variables
+if [ -f /lib/init/vars.sh ]; then
+ . /lib/init/vars.sh
+else
+ log_daemon_msg() { logger "$@"; }
+ log_end_msg() { [ $1 -eq 0 ] && RES=OK; logger ${RES:=FAIL}; }
+fi
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ TARGET_USER_NAME="ACCUMULO_USER"
+ TARGET_USER=$(eval "echo \$$TARGET_USER_NAME")
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ if [ "`jps -m | grep $ACCUMULO_PROC1`" -a "`jps -m | grep $ACCUMULO_PROC2`" ] ; then return 1; fi
+
+ su -s /bin/sh $TARGET_USER -c "/usr/lib/accumulo/bin/start-server.sh $IP logger"
+ su -s /bin/sh $TARGET_USER -c "/usr/lib/accumulo/bin/start-server.sh $IP tserver \"tablet server\""
+
+ if [ "`jps -m | grep $ACCUMULO_PROC1`" -a "`jps -m | grep $ACCUMULO_PROC2`" ] ; then return 0; fi
+ return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+
+ if [ ! "`jps -m | grep $ACCUMULO_PROC1`" -a ! "`jps -m | grep $ACCUMULO_PROC2`" ] ; then return 1; fi
+
+ su -s /bin/sh $TARGET_USER -c "/usr/lib/accumulo/bin/accumulo admin stop $IP"
+
+ if [ "`jps -m | grep $ACCUMULO_PROC1`" ] ; then jps -m | grep $ACCUMULO_PROC1 | awk '{print $1}' | xargs kill -9; fi
+ if [ "`jps -m | grep $ACCUMULO_PROC2`" ] ; then jps -m | grep $ACCUMULO_PROC2 | awk '{print $1}' | xargs kill -9; fi
+
+ if [ "`jps -m | grep $ACCUMULO_PROC1`" -a "`jps -m | grep $ACCUMULO_PROC2`" ] ; then return 2; fi
+
+ return 0;
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
View
159 assemble/scripts/init.d/accumulo-tracer
@@ -0,0 +1,159 @@
+#! /bin/sh
+# chkconfig: 2345 21 20
+### BEGIN INIT INFO
+# Provides: accumulo-tracer
+# Required-Start: $network $local_fs zookeeper-server
+# Required-Stop: $network $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: accumulo tracer
+# Description: The accumulo tracer provides a mechanism for tracing accumulo calls
+### END INIT INFO
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Do NOT "set -e"
+install -d -m 0775 -o root -g accumulo /var/run/accumulo
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/accumulo/bin
+DESC="Accumulo Tracer"
+NAME=accumulo-tracer
+ACCUMULO_PROC=tracer
+DAEMON=/usr/lib/accumulo/bin/start-server.sh
+IP=`ifconfig | grep inet[^6] | awk '{print $2}' | sed 's/addr://' | grep -v 0.0.0.0 | grep -v 127.0.0.1 | head -n 1`
+DAEMON_ARGS="$IP tracer"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Read configuration variable file if it is present
+[ -r /etc/default/accumulo ] && . /etc/default/accumulo
+
+# Load the VERBOSE setting and other rcS variables
+if [ -f /lib/init/vars.sh ]; then
+ . /lib/init/vars.sh
+else
+ log_daemon_msg() { logger "$@"; }
+ log_end_msg() { [ $1 -eq 0 ] && RES=OK; logger ${RES:=FAIL}; }
+fi
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ TARGET_USER_NAME="ACCUMULO_TRACER_USER"
+ TARGET_USER=$(eval "echo \$$TARGET_USER_NAME")
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ su -s /bin/sh $TARGET_USER -c "$DAEMON $DAEMON_ARGS > /dev/null || return 1"
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 0; fi
+ return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+
+ if [ ! "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ jps -m | grep $ACCUMULO_PROC | awk '{print $1}' | xargs kill -9
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 2; fi
+
+ return 0;
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
View
160 assemble/scripts/init.d/accumulo-tserver
@@ -0,0 +1,160 @@
+#! /bin/sh
+# chkconfig: 2345 21 15
+### BEGIN INIT INFO
+# Provides: accumulo-slave
+# Required-Start: $network $local_fs hadoop-namenode hadoop-datanode zookeeper-server accumulo-master
+# Required-Stop: $network $local_fs hadoop-datanode hadoop-namenode zookeeper-server accumulo-master
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: accumulo tserver and logger processes
+# Description: The accumulo slaves bundle the tserver and logger processes for accumulo
+### END INIT INFO
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Do NOT "set -e"
+install -d -m 0775 -o root -g accumulo /var/run/accumulo
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/accumulo/bin
+DESC="Accumulo Tserver"
+NAME=accumulo-tserver
+ACCUMULO_PROC=tserver
+DAEMON=/usr/lib/accumulo/bin/start-server.sh
+IP=`ifconfig | grep inet[^6] | awk '{print $2}' | sed 's/addr://' | grep -v 0.0.0.0 | grep -v 127.0.0.1 | head -n 1`
+DAEMON_ARGS="$IP slaves"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Read configuration variable file if it is present
+[ -r /etc/default/accumulo ] && . /etc/default/accumulo
+
+# Load the VERBOSE setting and other rcS variables
+if [ -f /lib/init/vars.sh ]; then
+ . /lib/init/vars.sh
+else
+ log_daemon_msg() { logger "$@"; }
+ log_end_msg() { [ $1 -eq 0 ] && RES=OK; logger ${RES:=FAIL}; }
+fi
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ TARGET_USER_NAME="ACCUMULO_USER"
+ TARGET_USER=$(eval "echo \$$TARGET_USER_NAME")
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ su -s /bin/sh $TARGET_USER -c "/usr/lib/accumulo/bin/start-server.sh $IP tserver \"tablet server\""
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 0; fi
+ return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+
+ if [ ! "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ su -s /bin/sh $TARGET_USER -c "/usr/lib/accumulo/bin/accumulo admin stop $IP"
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then jps -m | grep $ACCUMULO_PROC | awk '{print $1}' | xargs kill -9; fi
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 2; fi
+ return 0;
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
View
46 assemble/scripts/master-only-init.sh
@@ -0,0 +1,46 @@
+#! /bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+if [ ! -f /etc/default/accumulo ]; then
+ mkdir -p /etc/default
+ touch /etc/default/accumulo
+fi
+
+if ! grep "ACCUMULO_USER=" /etc/default/accumulo >> /dev/null ; then
+ echo "ACCUMULO_USER=accumulo" >> /etc/default/accumulo
+fi
+
+if ! id -u accumulo >/dev/null 2>&1; then
+ groupArg="U"
+ if egrep "^accumulo:" /etc/group >> /dev/null; then
+ groupArg="g accumulo"
+ fi
+ useradd -$groupArg -d /usr/lib/accumulo accumulo
+fi
+
+install -m 0755 -o root -g root init.d/accumulo-master /etc/init.d/
+if [ -e "`which update-rc.d`" ]; then
+ update-rc.d accumulo-master start 21 2 3 4 5 . stop 19 0 1 6 .
+elif [ -e "`which chkconfig`" ]; then
+ chkconfig --add accumulo-master
+else
+ echo "No update-rc.d or chkconfig, rc levels not set for accumulo-master"
+fi
View
45 assemble/scripts/monitor-only-init.sh
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+if [ ! -f /etc/default/accumulo ]; then
+ mkdir -p /etc/default
+ touch /etc/default/accumulo
+fi
+
+if ! grep "ACCUMULO_MONITOR_USER=" /etc/default/accumulo >> /dev/null ; then
+ echo "ACCUMULO_MONITOR_USER=accumulo_monitor" >> /etc/default/accumulo
+fi
+
+if ! id -u accumulo_monitor >/dev/null 2>&1; then
+ if ! egrep "^accumulo:" /etc/group > /dev/null; then
+ groupadd accumulo
+ fi
+ useradd -d /usr/lib/accumulo -g accumulo accumulo_monitor
+fi
+
+install -m 0755 -o root -g root init.d/accumulo-monitor /etc/init.d/
+if [ -e "`which update-rc.d`" ]; then
+ update-rc.d accumulo-monitor start 21 2 3 4 5 . stop 20 0 1 6 .
+elif [ -e "`which chkconfig`" ]; then
+ chkconfig --add accumulo-monitor
+else
+ echo "No update-rc.d or chkconfig, rc levels not set for accumulo-monitor"
+fi
View
46 assemble/scripts/slave-only-init.sh
@@ -0,0 +1,46 @@
+#! /bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+if [ ! -f /etc/default/accumulo ]; then
+ mkdir -p /etc/default
+ touch /etc/default/accumulo
+fi
+
+if ! grep "ACCUMULO_USER=" /etc/default/accumulo >> /dev/null ; then
+ echo "ACCUMULO_USER=accumulo" >> /etc/default/accumulo
+fi
+
+if ! id -u accumulo >/dev/null 2>&1; then
+ groupArg="U"
+ if egrep "^accumulo:" /etc/group >> /dev/null; then
+ groupArg="g accumulo"
+ fi
+ useradd -$groupArg -d /usr/lib/accumulo accumulo
+fi
+
+install -m 0755 -o root -g root init.d/accumulo-slave /etc/init.d/
+if [ -e "`which update-rc.d`" ]; then
+ update-rc.d accumulo-slave start 21 2 3 4 5 . stop 15 0 1 6 .
+elif [ -e "`which chkconfig`" ]; then
+ chkconfig --add accumulo-slave
+else
+ echo "No update-rc.d or chkconfig, rc levels not set for accumulo-slave"
+fi
View
15 ...search/ingest/src/main/protobuf/compile_protos.sh → assemble/scripts/stand-alone-init.sh
@@ -1,5 +1,4 @@
-#!/bin/bash
-
+#! /bin/sh
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
@@ -15,5 +14,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
-for PROTO in `ls -1 *proto`; do protoc --java_out ../java $PROTO; done
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+./gc-only-init.sh
+./monitor-only-init.sh
+./tracer-only-init.sh
+./master-only-init.sh
+./tserver-only-init.sh
View
45 assemble/scripts/tracer-only-init.sh
@@ -0,0 +1,45 @@
+#! /bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+if [ ! -f /etc/default/accumulo ]; then
+ mkdir -p /etc/default
+ touch /etc/default/accumulo
+fi
+
+if ! grep "ACCUMULO_TRACER_USER=" /etc/default/accumulo >> /dev/null ; then
+ echo "ACCUMULO_TRACER_USER=accumulo_tracer" >> /etc/default/accumulo
+fi
+
+if ! id -u accumulo_tracer >/dev/null 2>&1; then
+ if ! egrep "^accumulo:" /etc/group >> /dev/null; then
+ groupadd accumulo
+ fi
+ useradd -d /usr/lib/accumulo -g accumulo accumulo_tracer
+fi
+
+install -m 0755 -o root -g root init.d/accumulo-tracer /etc/init.d/
+if [ -e "`which update-rc.d`" ]; then
+ update-rc.d accumulo-tracer start 22 2 3 4 5 . stop 20 0 1 6 .
+elif [ -e "`which chkconfig`" ]; then
+ chkconfig --add accumulo-tracer
+else
+ echo "No update-rc.d or chkconfig, rc levels not set for accumulo-tracer"
+fi
View
46 assemble/scripts/tserver-only-init.sh
@@ -0,0 +1,46 @@
+#! /bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+if [ ! -f /etc/default/accumulo ]; then
+ mkdir -p /etc/default
+ touch /etc/default/accumulo
+fi
+
+if ! grep "ACCUMULO_USER=" /etc/default/accumulo >> /dev/null ; then
+ echo "ACCUMULO_USER=accumulo" >> /etc/default/accumulo
+fi
+
+if ! id -u accumulo >/dev/null 2>&1; then
+ groupArg="U"
+ if egrep "^accumulo:" /etc/group >> /dev/null; then
+ groupArg="g accumulo"
+ fi
+ useradd -$groupArg -d /usr/lib/accumulo accumulo
+fi
+
+install -m 0755 -o root -g root init.d/accumulo-tserver /etc/init.d/
+if [ -e "`which update-rc.d`" ]; then
+ update-rc.d accumulo-tserver start 21 2 3 4 5 . stop 15 0 1 6 .
+elif [ -e "`which chkconfig`" ]; then
+ chkconfig --add accumulo-tserver
+else
+ echo "No update-rc.d or chkconfig, rc levels not set for accumulo-tserver"
+fi
View
73 bin/accumulo
@@ -15,15 +15,40 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+_readlink ()
+{
+ result=`readlink -f $1 2>/dev/null`
+ if [ $? -eq 0 ];
+ then
+ echo $result
+ return 0
+ fi
+
+ oldPath=$1
+ if [ -n `echo $oldPath | egrep "^[.]"` ]; then
+ oldPath=`echo $1 | sed -e 's#[.]/##'`
+ fi
+ if [ -z `echo $oldPath | egrep '^/'` ]; then
+ oldPath="`pwd`/$oldPath"
+ fi
+ newPath=$oldPath
+ while [ "$newPath" ];
+ do
+ oldPath=$newPath
+ newPath=`readlink $newPath`
+ done
+
+ echo $oldPath
+ return 0
+}
-bin=`dirname "$0"`
+bin=`_readlink $0`
+bin=`dirname "$bin"`
bin=`cd "$bin"; pwd`
. "$bin"/config.sh
-START_JAR=$ACCUMULO_HOME/lib/accumulo-start-$ACCUMULO_VERSION.jar
-COMMONS_JCI_JARS=$ACCUMULO_HOME/lib/commons-jci-core-1.0.jar:$ACCUMULO_HOME/lib/commons-jci-fam-1.0.jar:$ACCUMULO_HOME/lib/log4j-1.2.16.jar:$ACCUMULO_HOME/lib/commons-logging-1.0.4.jar:$ACCUMULO_HOME/lib/commons-logging-api-1.0.4.jar
-START_CLASSES_DIR=$ACCUMULO_HOME/src/start/target/classes
+START_JAR=$ACCUMULO_HOME/lib/accumulo-start-$ACCUMULO_VERSION.jar:$ACCUMULO_HOME/lib/log4j-1.2.16.jar
locationByProgram()
{
@@ -42,22 +67,6 @@ test -n "$ZOOKEEPER_HOME" || export ZOOKEEPER_HOME=`locationByProgram zkCli.sh`
DEFAULT_GENERAL_JAVA_OPTS=""
-BIG=6g
-MED=3g
-SMALL=512m
-if ! "$JAVA_HOME/bin/java" -Xms10g -Xmx10g >/dev/null 2>&1 ; then
- BIG=3g
- MED=1g
- SMALL=256m
-fi
-
-test -n "$ACCUMULO_TSERVER_OPTS" || export ACCUMULO_TSERVER_OPTS="-Xmx$BIG -Xms$BIG "
-test -n "$ACCUMULO_MASTER_OPTS" || export ACCUMULO_MASTER_OPTS="-Xmx$MED -Xms$MED "
-test -n "$ACCUMULO_GC_OPTS" || export ACCUMULO_GC_OPTS="-Xmx$SMALL -Xms$SMALL "
-test -n "$ACCUMULO_MONITOR_OPTS" || export ACCUMULO_MONITOR_OPTS="-Xmx$MED -Xms$SMALL "
-test -n "$ACCUMULO_LOGGER_OPTS" || export ACCUMULO_LOGGER_OPTS="-Xmx$MED -Xms$SMALL "
-test -n "$ACCUMULO_GENERAL_OPTS" || export ACCUMULO_GENERAL_OPTS="$DEFAULT_GENERAL_JAVA_OPTS"
-test -n "$ACCUMULO_OTHER_OPTS" || export ACCUMULO_OTHER_OPTS="-Xmx$MED -Xms$SMALL "
# ACCUMULO_XTRAJARS is where all of the commandline -add items go into for reading by accumulo.
if [ "$1" = "-add" ] ; then
@@ -82,19 +91,27 @@ else
fi
XML_FILES=${ACCUMULO_HOME}/conf
-CLASSPATH=${XML_FILES}:${START_JAR}:${COMMONS_JCI_JARS}
+CLASSPATH=${XML_FILES}:${START_JAR}
if [ -z $JAVA_HOME -o ! -d $JAVA_HOME ]; then
- echo "JAVA_HOME is not set. Please make sure it's set globally or in conf/accumulo-env.sh"
- exit 1
+ echo "JAVA_HOME is not set. Please make sure it's set globally or in conf/accumulo-env.sh"
+ exit 1
fi
if [ -z $HADOOP_HOME -o ! -d $HADOOP_HOME ]; then
- echo "HADOOP_HOME is not set. Please make sure it's set globally or in conf/accumulo-env.sh"
- exit 1
+ echo "HADOOP_HOME is not set. Please make sure it's set globally or in conf/accumulo-env.sh"
+ exit 1
fi
if [ -z $ZOOKEEPER_HOME -o ! -d $ZOOKEEPER_HOME ]; then
- echo "ZOOKEEPER_HOME is not set. Please make sure it's set globally or in conf/accumulo-env.sh"
- exit 1
+ echo "ZOOKEEPER_HOME is not set. Please make sure it's set globally or in conf/accumulo-env.sh"
+ exit 1
+fi
+if [ -z $ACCUMULO_LOG_DIR ]; then
+ echo "ACCUMULO_LOG_DIR is not set. Please make sure it's set globally or in conf/accumulo-env.sh"
+ exit 1
+fi
+
+if [ ! -d "$ACCUMULO_LOG_DIR" ]; then
+ mkdir -p $ACCUMULO_LOG_DIR;
fi
#Export the variables just in case they are not exported
@@ -107,4 +124,4 @@ JAVA=$JAVA_HOME/bin/java