私は PySpark 1.5.2 を使用しています。UserWarning Please install psutil to have better support with spilling
コマンドを発行した後に取得しました.collect()
この警告が表示されるのはなぜですか?
どうすればインストールできpsutil
ますか?
次のリンクで psutil プロジェクトを複製またはダウンロードできます: https://github.com/giampaolo/psutil.git
次に、setup.py を実行して psutil をインストールします
「spark/python/pyspark/shuffle.py」では、次のコードを確認できます。
def get_used_memory():
""" Return the used memory in MB """
if platform.system() == 'Linux':
for line in open('/proc/self/status'):
if line.startswith('VmRSS:'):
return int(line.split()[1]) >> 10
else:
warnings.warn("Please install psutil to have better "
"support with spilling")**
if platform.system() == "Darwin":
import resource
rss = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
return rss >> 20
# TODO: support windows
return 0
y os が Linux でない場合は、psutil をお勧めします。