start_thrift_server.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/sh
  2. # Licensed to Cloudera, Inc. under one
  3. # or more contributor license agreements. See the NOTICE file
  4. # distributed with this work for additional information
  5. # regarding copyright ownership. Cloudera, Inc. licenses this file
  6. # to you under the Apache License, Version 2.0 (the
  7. # "License"); you may not use this file except in compliance
  8. # with the License. You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. CLASSPATH=
  18. TOP=../../../..
  19. # the hadoop libraries
  20. for f in $TOP/build/*.jar ; do
  21. CLASSPATH=$CLASSPATH:$f
  22. done
  23. # the apache libraries
  24. for f in $TOP/lib/*.jar ; do
  25. CLASSPATH=$CLASSPATH:$f
  26. done
  27. # the thrift libraries
  28. for f in $TOP/lib/thrift/*.jar ; do
  29. CLASSPATH=$CLASSPATH:$f
  30. done
  31. # the thrift server
  32. for f in $TOP/build/contrib/thriftfs/*.jar ; do
  33. CLASSPATH=$CLASSPATH:$f
  34. done
  35. # the thrift hadoop api
  36. for f in $TOP/src/contrib/thriftfs/lib/*.jar ; do
  37. CLASSPATH=$CLASSPATH:$f
  38. done
  39. java -Dcom.sun.management.jmxremote -cp $CLASSPATH org.apache.hadoop.thriftfs.HadoopThriftServer $*