output array exec usr local bin hadoop fs -ls user umhead perso source

1
2
3
4
5
6
$output = array();
exec('/usr/local/bin/hadoop fs -ls /user/umhead/perso/sources/factors/ruid_domain_likelihood/dt=*/000001_0.deflate', $output);
$perso_ruid_domain_likelihood_part_recom = trim($output[count($output) - 1]);
$perso_ruid_domain_likelihood_part_learn = trim($output[count($output) - 1 - $days_to_skip_for_learn]);
$perso_ruid_domain_likelihood_part_recom = substr($perso_ruid_domain_likelihood_part_recom, strpos($perso_ruid_domain_likelihood_part_recom, '/user/umhead/perso/sources/factors/ruid_domain_likelihood/dt=') + strlen('/user/umhead/perso/sources/factors/ruid_domain_likelihood/dt='), strlen('2013-01-08'));
$perso_ruid_domain_likelihood_part_learn = substr($perso_ruid_domain_likelihood_part_learn, strpos($perso_ruid_domain_likelihood_part_learn, '/user/umhead/perso/sources/factors/ruid_domain_likelihood/dt=') + strlen('/user/umhead/perso/sources/factors/ruid_domain_likelihood/dt='), strlen('2013-01-08'));