[ 
https://issues.apache.org/jira/browse/HDFS-16466?focusedWorklogId=788306&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-788306
 ]

ASF GitHub Bot logged work on HDFS-16466:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Jul/22 15:25
            Start Date: 06/Jul/22 15:25
    Worklog Time Spent: 10m 
      Work Description: GauthamBanasandra commented on code in PR #4526:
URL: https://github.com/apache/hadoop/pull/4526#discussion_r914975476


##########
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/x-platform/stat.h:
##########
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef NATIVE_LIBHDFSPP_LIB_CROSS_PLATFORM_STAT
+#define NATIVE_LIBHDFSPP_LIB_CROSS_PLATFORM_STAT
+
+#if defined(_WIN32)
+
+// Windows.
+// These macros are derived from POSIX sys/stat.h. Windows defines some of
+// these macros, but not all. Thus, we align with the bits defined by POSIX for
+// all of them to be consistent.
+#define S_IRUSR 0400

Review Comment:
   @goiri these macros are only used for stringifying the `StatInfo` received 
from the HDFS server -
   
https://github.com/apache/hadoop/blob/3ec4b932c179d9ec6c4e465f25e35b3d7eded08b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/statinfo.cc#L40-L50
   
   Stringify -
   
https://github.com/apache/hadoop/blob/3ec4b932c179d9ec6c4e465f25e35b3d7eded08b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/statinfo.cc#L64
   
   It's not used in any upstream operation. Using a third-party library won't 
be of much use here.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 788306)
    Time Spent: 2h 50m  (was: 2h 40m)

> Implement Linux permission flags on Windows
> -------------------------------------------
>
>                 Key: HDFS-16466
>                 URL: https://issues.apache.org/jira/browse/HDFS-16466
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: libhdfs++
>    Affects Versions: 3.4.0
>         Environment: Windows 10
>            Reporter: Gautham Banasandra
>            Assignee: Gautham Banasandra
>            Priority: Major
>              Labels: libhdfscpp, pull-request-available
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> [statinfo.cc|https://github.com/apache/hadoop/blob/869317be0a1fdff23be5fc500dcd9ae4ecd7bc29/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/statinfo.cc#L41-L49]
>  uses POSIX permission flags. These flags aren't available for Windows. We 
> need to implement the equivalent flags on Windows to make this cross platform 
> compatible.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to