1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under both the GPLv2 (found in the
3 // COPYING file in the root directory) and Apache 2.0 License
4 // (found in the LICENSE.Apache file in the root directory).
8 import java
.util
.Objects
;
10 public class TableFileCreationInfo
extends TableFileCreationBriefInfo
{
11 private final long fileSize
;
12 private final TableProperties tableProperties
;
13 private final Status status
;
16 * Access is protected as this will only be constructed from
19 * @param fileSize the size of the table file
20 * @param tableProperties the properties of the table file
21 * @param status the status of the creation operation
22 * @param dbName the database name
23 * @param columnFamilyName the column family name
24 * @param filePath the path to the table file
25 * @param jobId the job identifier
26 * @param tableFileCreationReasonValue the reason for creation of the table file
28 protected TableFileCreationInfo(final long fileSize
, final TableProperties tableProperties
,
29 final Status status
, final String dbName
, final String columnFamilyName
,
30 final String filePath
, final int jobId
, final byte tableFileCreationReasonValue
) {
31 super(dbName
, columnFamilyName
, filePath
, jobId
, tableFileCreationReasonValue
);
32 this.fileSize
= fileSize
;
33 this.tableProperties
= tableProperties
;
38 * Get the size of the file.
42 public long getFileSize() {
47 * Get the detailed properties of the created file.
49 * @return the properties.
51 public TableProperties
getTableProperties() {
52 return tableProperties
;
56 * Get the status indicating whether the creation was successful or not.
60 public Status
getStatus() {
65 public boolean equals(Object o
) {
68 if (o
== null || getClass() != o
.getClass())
70 TableFileCreationInfo that
= (TableFileCreationInfo
) o
;
71 return fileSize
== that
.fileSize
&& Objects
.equals(tableProperties
, that
.tableProperties
)
72 && Objects
.equals(status
, that
.status
);
76 public int hashCode() {
77 return Objects
.hash(fileSize
, tableProperties
, status
);
81 public String
toString() {
82 return "TableFileCreationInfo{"
83 + "fileSize=" + fileSize
+ ", tableProperties=" + tableProperties
+ ", status=" + status