Repository navigation
ORC-1488: [Java] Mark getFileMetadata as deprecated - #1592
deshanxiao wants to merge 1 commit into
Conversation
|
cc @mystic-lama @dongjoon-hyun |
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Hi, @deshanxiao . We need a new JIRA issue for this because the deprecation should happen in 1.9.x and the removal might happen in 2.0.x.
|
Let me repeat once more.
|
|
Yes I agree with you @dongjoon-hyun . Thank you for your reminder. I have created a new JIRA ORC-1488 |
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Oops. The PR description seems to be misleading in another way. What do you want to mean by the following?
2.There is not any class implementing FileMetadata
Apache ORC 1.9 is still using it here, isn't it?
The interface |
|
What do you mean by
If it means public FileMetadata getFileMetadata() {
return null;
} |
|
@dongjoon-hyun I have another point of view. After we figure out whether there is a downstream useful method to set filemeta, we should not reimplement it for compatibility reasons. |
|
If we are not sure yet, we had better not touch this until we figure out it, @deshanxiao . |
|
Could you answer my question, #1592 (comment)? |
@dongjoon-hyun Yes, I mean |
|
Unfortunately, hive implements Judging from its implementation and comments, Hive /** ORC file metadata. Currently contains some duplicate info due to how different parts
* of ORC use different info. Ideally we would get rid of protobuf structs in code beyond reading,
* or instead use protobuf structs everywhere instead of the mix of things like now.
*/
public final class OrcFileMetadata implements FileMetadata, ConsumerFileMetadata {
private final List<StripeInformation> stripes;
private final List<Integer> versionList;
private final List<OrcProto.StripeStatistics> stripeStats;
private final List<OrcProto.Type> types;public interface ConsumerFileMetadata {
int getStripeCount();
CompressionKind getCompressionKind();
List<Type> getTypes();
TypeDescription getSchema() throws FileFormatException;
OrcFile.Version getFileVersion();
CalendarKind getCalendar();
} long startTime = counters.startTimeCounter();
ReaderOptions opts = EncodedOrcFile.readerOptions(jobConf).filesystem(fsSupplier).fileMetadata(fileMetadata);
if (split instanceof OrcSplit) {
OrcTail orcTail = ((OrcSplit) split).getOrcTail();
if (orcTail != null) {
LlapIoImpl.ORC_LOGGER.debug("Setting OrcTail. path={}", path);
opts.orcTail(orcTail);
}
} |
|
Overall, main downstreams of Apache ORC that depend on 1.Apache Hive ( Apache ORC v1.9 and higher do not implement the interface |
|
Thank you for the investigation and sharing, @deshanxiao . |

What changes were proposed in this pull request?
This PR is aimed to mark
getFileMetadataas deprecated.This PR targets for ORC 1.9.x.
For ORC 2.0, please see #1588
Why are the changes needed?
1.FileMetadata has been marked as deprecated in ORC 1.6.0 Jira PR
2.FileMetadata does not have any class to implement it, and inside ORC apache1.9, getFileMetadata always returns null.
How was this patch tested?
Exist UT