After a node crashes, after a reboot, observe the spark cluster log and discover that there is a time when the problem cannot be synchronized.
After a careful examination of the system, enter Date-r to find the time zone set to null. The back is directly +0000.
This is definitely not the same, and then enter date-u and date, found two time actually consistent. But it was.
This UTC time is meant to be added to the time zone, so two values are normal when the time zone is not set.
However, according to various methods on the Internet, has not been successful:
Such as
$ sudo cp/usr/share/zoneinfo/asia/shanghai/etc/localtime
or modify/etc/sysconfig/clock and other ways, found that all do not work. Even set the date-s ' XXX ' command, immediately back to the original place.
After a sober analysis, it is found that the time zone setting does not work. It is found that most of these configurations require time to restart in order to take effect.
However, if the cluster continues to run, can the time zone be modified without restarting?
Only to find out in the/etc/profile simply set the
Export tz= ' CST-8 ', the immediate entry into force will be all done.
As the problem took nearly 20 minutes, the solution to the problem was recorded.