You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/11/04 08:39:00 UTC

[jira] [Work logged] (HADOOP-17880) Build 2.10.x with docker

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

ASF GitHub Bot logged work on HADOOP-17880:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 04/Nov/21 08:38
            Start Date: 04/Nov/21 08:38
    Worklog Time Spent: 10m 
      Work Description: GauthamBanasandra commented on a change in pull request #3535:
URL: https://github.com/apache/hadoop/pull/3535#discussion_r742627585



##########
File path: dev-support/docker/pkg-resolver/resolve.py
##########
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+
+# 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.
+
+"""
+Platform package dependency resolver for building Apache Hadoop.
+"""
+
+import json
+import os
+import sys
+from check_platform import is_supported_platform
+
+
+def get_packages(platform):
+    """
+    Resolve and get the list of packages to install for the given platform.
+
+    :param platform: The platform for which the packages needs to be resolved.
+    :return: A list of resolved packages to install.
+    """
+    with open('pkg-resolver/packages.json', mode='rb') as pkg_file:
+        pkgs = json.loads(pkg_file.read().decode("UTF-8"))
+    packages = []
+    for platforms in [x for x in pkgs.values() if x.get(platform) is not None]:
+        if isinstance(platforms.get(platform), list):
+            packages.extend(platforms.get(platform))
+        else:
+            packages.append(platforms.get(platform))
+    return packages
+
+
+if __name__ == '__main__':
+    if len(sys.argv) < 2:
+        sys.stderr.write('ERROR: Need at least 1 argument, {} were provided{}'.format(
+            len(sys.argv) - 1, os.linesep))
+        sys.exit(1)
+
+    PLATFORM_ARG = sys.argv[1]

Review comment:
       @ZhendongBai just a small question if you don't mind - why is this in all caps? Is this a known convention in Python? Could you please change it back to lowercase if it's alright?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

    Worklog Id:     (was: 676263)
    Time Spent: 12h 40m  (was: 12.5h)

> Build 2.10.x with docker
> ------------------------
>
>                 Key: HADOOP-17880
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17880
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.10.0
>         Environment: mac os x86_64
>            Reporter: baizhendong
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 12h 40m
>  Remaining Estimate: 0h
>
> 1. currently, we build the hadoop 2.10.0 with docker machine, and must install Virtual Box, and for hadoop 3.x, just build with docker only.
> 2. besides this, the docker image dependency is out of date, and some of them is unavaialble, for example – jdk7
> 3. but just building hadoop 2.10.0 with hadoop 3.x build script without modification is not working, for the protocol buffer version is not 2.5.0, and it's not work for native build.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org