[Impala-ASF-CR] IMPALA-8065 Add OS version and Kernel version in OSInfo

2019-10-30 Thread Andrew Sherman (Code Review)
Andrew Sherman has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/14531 )

Change subject: IMPALA-8065 Add OS version and Kernel version in OSInfo
..


Patch Set 3:

(8 comments)

Code looks good, Comments and commit message need more work, I think

http://gerrit.cloudera.org:8080/#/c/14531/3//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/14531/3//COMMIT_MSG@8
PS3, Line 8:
I think it is important to write a commit message that can be understood
by someone who has not read the code you are changing. Sometimes it
helps to explain what the code is.

OsInfo is used to get human readable information about the OS on which
Impala is running.

Before this change OsInfo::DebugString() would print two lines:
- OS version: the long name of the Linux kernel from /proc/version
- Clock: the type of clock used
After this change OsInfo::DebugString() will print three lines:
- OS version: the short name of the Linux distribution.
  If Docker is being used this is the name of the Container OS
- Kernel version: the long name of the Linux kernel from /proc/version
  If Docker is being used this is the description of the Host OS.
- Clock: the type of clock used


http://gerrit.cloudera.org:8080/#/c/14531/3//COMMIT_MSG@15
PS3, Line 15: OS version: "Ubuntu 16.04.6 LTS"
Why does OS Version have quotes but Kernel version does not?


http://gerrit.cloudera.org:8080/#/c/14531/3/be/src/util/CMakeLists.txt
File be/src/util/CMakeLists.txt:

http://gerrit.cloudera.org:8080/#/c/14531/3/be/src/util/CMakeLists.txt@124
PS3, Line 124:   os-info-test.cc
These should be in alphabetical order


http://gerrit.cloudera.org:8080/#/c/14531/3/be/src/util/CMakeLists.txt@187
PS3, Line 187: ADD_UNIFIED_BE_LSAN_TEST(os-info-test "OsInfo.*")
These should be in alphabetical order


http://gerrit.cloudera.org:8080/#/c/14531/3/be/src/util/os-info-test.cc
File be/src/util/os-info-test.cc:

http://gerrit.cloudera.org:8080/#/c/14531/3/be/src/util/os-info-test.cc@25
PS3, Line 25:   ASSERT_NE(osinfo.os_version(), "Unknown");
Add a simple comment explaining the test


http://gerrit.cloudera.org:8080/#/c/14531/3/be/src/util/os-info.h
File be/src/util/os-info.h:

http://gerrit.cloudera.org:8080/#/c/14531/3/be/src/util/os-info.h@35
PS3, Line 35:   /// Name of the OS release.
Simple name of the OS.
If Docker is used this is the name of the Container OS


http://gerrit.cloudera.org:8080/#/c/14531/3/be/src/util/os-info.h@42
PS3, Line 42:   /// and the version of a GCC compiler used to build it.
The version of Linux kernel and the version of the compiler used to build it.
If Docker is used this is the Host OS.


http://gerrit.cloudera.org:8080/#/c/14531/3/be/src/util/os-info.cc
File be/src/util/os-info.cc:

http://gerrit.cloudera.org:8080/#/c/14531/3/be/src/util/os-info.cc@62
PS3, Line 62: os_path = "/etc/centos-release";
Add a comment saying "Only old distributions like Centos 6"



--
To view, visit http://gerrit.cloudera.org:8080/14531
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I848c9e53ee4e0bf8ae0874bb6da28e8efa7f7c8a
Gerrit-Change-Number: 14531
Gerrit-PatchSet: 3
Gerrit-Owner: Xiaomeng Zhang 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Xiaomeng Zhang 
Gerrit-Comment-Date: Thu, 31 Oct 2019 00:06:28 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-8065 Add OS version and Kernel version in OSInfo

2019-10-30 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/14531 )

Change subject: IMPALA-8065 Add OS version and Kernel version in OSInfo
..


Patch Set 3:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/4914/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/14531
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I848c9e53ee4e0bf8ae0874bb6da28e8efa7f7c8a
Gerrit-Change-Number: 14531
Gerrit-PatchSet: 3
Gerrit-Owner: Xiaomeng Zhang 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Xiaomeng Zhang 
Gerrit-Comment-Date: Wed, 30 Oct 2019 23:54:26 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-8065 Add OS version and Kernel version in OSInfo

2019-10-30 Thread Xiaomeng Zhang (Code Review)
Xiaomeng Zhang has uploaded a new patch set (#3). ( 
http://gerrit.cloudera.org:8080/14531 )

Change subject: IMPALA-8065 Add OS version and Kernel version in OSInfo
..

IMPALA-8065 Add OS version and Kernel version in OSInfo

Original we get /proc/version displayed as OS version, while it's
actually kernel version. We should correct it as Kernel version,
and display OS version from /etc/os-release (for centos6 it's
/etc/centos-release).

Tested locally, the displayed OS Info in Ubuntu16 dev box is:
OS version: "Ubuntu 16.04.6 LTS"
Kernel version: Linux version 4.15.0-65-generic (buildd@lcy01-amd64-017)
(gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10))
Clock: clocksource: 'tsc', clockid_t: CLOCK_MONOTONIC

Also tested with diff OS in docker: centos, redhat, ubuntu, oracle,
debian. Each OS picked one version to test.

Added new backend test os-info-test.cc.

Change-Id: I848c9e53ee4e0bf8ae0874bb6da28e8efa7f7c8a
---
M be/src/util/CMakeLists.txt
A be/src/util/os-info-test.cc
M be/src/util/os-info.cc
M be/src/util/os-info.h
4 files changed, 71 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/31/14531/3
--
To view, visit http://gerrit.cloudera.org:8080/14531
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I848c9e53ee4e0bf8ae0874bb6da28e8efa7f7c8a
Gerrit-Change-Number: 14531
Gerrit-PatchSet: 3
Gerrit-Owner: Xiaomeng Zhang 
Gerrit-Reviewer: Andrew Sherman 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Xiaomeng Zhang