我有一个(scala/spark) DataFrame df,我想将它保存到拼图上,每个拼图文件大约128MB。根据该模式,我粗略地估计了一行的大小。我的策略是使用生成“超大”分区的值对数据帧进行重新分区。然后,我利用选项maxRecordsPerFile来获得我想要的拼图文件大小:
val countLines = df.count
val estimatedSize = countLines * 250 / (1024 * 1024) // one line is around 250 Bytes
val repartitionEstimate = (esti
我想得到我正在处理的文件夹的大小,我已经尝试了以下几种方法:
右击并检查文件夹的属性(105.8MB)
直接在终端中的命令:
- du -hsc \* (last line where total appears 105MB)
- du -sch (last line where total appears 418MB)
方法: (418 method )
为什么我有这么大的尺码?
我使用的是CentOS 6.x。我想调整LVM分区的大小,但是当我使用parted查看分区信息时,我并不感到困惑。我有几个问题。请查看下面的分区信息。
$ parted
GNU Parted 2.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print all
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 65.9GB
Sector size (logical/physical): 512B/5
我买了一个新的NVMe SSD (SB-ROCKET-256),并使用gdisk安装了Arch来进行分区。理论上,这个SSD不支持512 e,我认为物理尺寸应该是4096,我错了吗?我该怎么纠正呢?分区表如下:
$ parted --align optimal /dev/nvme0n1
GNU Parted 3.2
Using /dev/nvme0n1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print