cluster_partition_dir = MERGED_DIR / cluster_chunk
cluster_partition_dir.mkdir(parents=True, exist_ok=True)
target_output_file = cluster_partition_dir / f"daily_enriched_{cluster_chunk}_{date_chunk}.parquet"
ns_output_file = cluster_partition_dir / f"daily_ns_usage_{cluster_chunk}_{date_chunk}.parquet"
pareto_output_file = cluster_partition_dir / f"pareto_ns_{cluster_chunk}_{date_chunk}.parquet"
print(f" 📤 [AIStor 적재] 정산 완료본 오브젝트 스토리지로 업로드 중...")
try:
s3_client.upload_file(
str(target_output_file), bucket_name,
f"merged/{cluster_chunk}/{target_output_file.name}"
)
s3_client.upload_file(
str(ns_output_file), bucket_name,
f"merged/{cluster_chunk}/{ns_output_file.name}"
)
s3_client.upload_file(
str(pareto_output_file), bucket_name,
f"merged/{cluster_chunk}/{pareto_output_file.name}"
)
print(f" ✅ [업로드 완수] AIStor Table 동기화 완료.")
except Exception as e:
print(f" ❌ [업로드 실패] AIStor 네트워크 통신 장애: {str(e)}")