PageRenderTime 51ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/ql/src/java/org/apache/hadoop/hive/ql/io/HiveOutputFormat.java

#
Java | 65 lines | 14 code | 6 blank | 45 comment | 0 complexity | 12fc84f3d47e59419ca69420143fc848 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.io;
  19. import java.io.IOException;
  20. import java.util.Properties;
  21. import org.apache.hadoop.fs.Path;
  22. import org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter;
  23. import org.apache.hadoop.io.Writable;
  24. import org.apache.hadoop.io.WritableComparable;
  25. import org.apache.hadoop.mapred.JobConf;
  26. import org.apache.hadoop.util.Progressable;
  27. /**
  28. * <code>HiveOutputFormat</code> describes the output-specification for Hive's
  29. * operators. It has a method
  30. * {@link #getHiveRecordWriter(JobConf, Path, Class, boolean, Properties, Progressable)}
  31. * , with various parameters used to create the final out file and get some
  32. * specific settings.
  33. *
  34. * @see org.apache.hadoop.mapred.OutputFormat
  35. * @see RecordWriter
  36. * @see JobConf
  37. */
  38. public interface HiveOutputFormat<K extends WritableComparable, V extends Writable> {
  39. /**
  40. * create the final out file and get some specific settings.
  41. *
  42. * @param jc
  43. * the job configuration file
  44. * @param finalOutPath
  45. * the final output file to be created
  46. * @param valueClass
  47. * the value class used for create
  48. * @param isCompressed
  49. * whether the content is compressed or not
  50. * @param tableProperties
  51. * the table properties of this file's corresponding table
  52. * @param progress
  53. * progress used for status report
  54. * @return the RecordWriter for the output file
  55. */
  56. RecordWriter getHiveRecordWriter(JobConf jc, Path finalOutPath,
  57. final Class<? extends Writable> valueClass, boolean isCompressed,
  58. Properties tableProperties, Progressable progress) throws IOException;
  59. }