kubectl cp:数据丢失了吗?

时间:2019-01-02 22:23:03

标签: kubernetes centos kubectl kubernetes-pod

我的本​​地文件:

ls -al spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
-rw-r--r--  1 me  110502799  137448102 Jan  2 16:59 spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar

我用kubectl cp将此文件复制到k8s中的centOS pod中,但是我知道了

# ls -al examples/jars/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
-rw------- 1 root root 110690304 Jan  2 22:15 examples/jars/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar

但是137448102!=110690304。是否丢失了数据?

谢谢

更新

我又做了一个kubectl cp,并在下面放置了更多详细信息:

在MAC上:

me$ ls -al target/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
-rw-r--r--  1 me  110502799  137448102 Jan  2 17:24 target/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
me$ md5 target/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
MD5 (target/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar) = ff6ae687b19c97871e65db6e4ea6002f

在k8s的CentOS POD上:

root@myspark-master-5d6656bd84-79745:/usr/spark-2.3.1# ls -al examples/jars/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
-rw------- 1 root root 132054528 Jan  2 22:47 examples/jars/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
root@myspark-master-5d6656bd84-79745:/usr/spark-2.3.1# md5sum examples/jars/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar
edc4ddc8f011e5b8e79741e15ac1ac1d  examples/jars/spark-streaming-1.0-SNAPSHOT-jar-with-dependencies.jar

0 个答案:

没有答案