hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-9446) tSize of libhdfs in hadoop-2.7.1 is still int32_t
Date Fri, 29 Jan 2016 23:50:39 GMT

    [ https://issues.apache.org/jira/browse/HDFS-9446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15124454#comment-15124454

Colin Patrick McCabe commented on HDFS-9446:

The new hdfsStreamBuilder API added in HDFS-9541 allows users to create files with a block
size bigger than 2 GB.

For the other places where tSize is used, a 4-byte number is appropriate.  It doesn't make
sense to read/write more than 2 GB in a single call to {{hdfsRead}} or {{hdfsWrite}} (this
is why the Java code uses {{int}} for those values).

Meanwhile, the size of files returned by {{hdfsListDirectory}} uses {{tOffset}} rather than
{{tSize}}.  Unlike {{tSize}}, {{tOffset}} is typedef'ed as an {{int64_t}}

Closing as a duplicate of HDFS-9541.  Thanks, all.

> tSize of libhdfs in hadoop-2.7.1 is still int32_t
> -------------------------------------------------
>                 Key: HDFS-9446
>                 URL: https://issues.apache.org/jira/browse/HDFS-9446
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Glen Cao
> Issue (https://issues.apache.org/jira/browse/HDFS-466) says what I mentioned in the title
is fixed. However, I find that in the source (hadoop-hdfs-project/hadoop-hdfs/src/main/native/libhdfs/hdfs.h)
of hadoop-2.7.1, tSize is still typedef-ed as int32_t and I don't find any compilation option
about that.
> In hdfs.h:
> 75     typedef int32_t   tSize; /// size of data for read/write io ops

This message was sent by Atlassian JIRA

View raw message