PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/release-0.1-rc2/hive/external/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ZooKeeperHiveLock.java

#
Java | 59 lines | 32 code | 10 blank | 17 comment | 0 complexity | f706b35231456b090ebd59047f5b0172 MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF 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. */
  18. package org.apache.hadoop.hive.ql.lockmgr.zookeeper;
  19. import org.apache.hadoop.hive.ql.lockmgr.HiveLock;
  20. import org.apache.hadoop.hive.ql.lockmgr.HiveLockMode;
  21. import org.apache.hadoop.hive.ql.lockmgr.HiveLockObject;
  22. public class ZooKeeperHiveLock extends HiveLock {
  23. private String path;
  24. private HiveLockObject obj;
  25. private HiveLockMode mode;
  26. public ZooKeeperHiveLock(String path, HiveLockObject obj, HiveLockMode mode) {
  27. this.path = path;
  28. this.obj = obj;
  29. this.mode = mode;
  30. }
  31. public String getPath() {
  32. return path;
  33. }
  34. public void setPath(String path) {
  35. this.path = path;
  36. }
  37. public HiveLockObject getHiveLockObject() {
  38. return obj;
  39. }
  40. public void setHiveLockObject(HiveLockObject obj) {
  41. this.obj = obj;
  42. }
  43. public HiveLockMode getHiveLockMode() {
  44. return mode;
  45. }
  46. public void setHiveLockMode(HiveLockMode mode) {
  47. this.mode = mode;
  48. }
  49. }