hdfsgethost problem

Hi there ,

I have a problem to pass a value to the parameter to hdfsgethost function.

My codes are as below:

for (i = 0; i<monitor->nr_files; i++){
cout << "monitor_file";
cout <<"file"<< monitor->file[i];
char * test= monitor->file[i];
char * y = "/Day0.svm";
cout <<" y is "<<y<<"\n";
char ***location = hdfsGetHosts(fs,monitor->file[i], 0, 64000000);
char ***loca = hdfsGetHosts(fs,test, 0, 64000000);
char ***loc= hdfsGetHosts(fs,y,0,64000000);
cout<<"location is"<<location<<"\n";
cout<<"location0 is"<<loca<<"\n";
cout<<"location1 is"<<loc<<"\n";
}

The results are always look like the following:

monitor_filefile/Day0.svm
y is /Day0.svm
location is0
location0 is0
location1 is0x313bf20

I do not understand why I get not pass monitor->file[I] or test to the hdfsgethost, or do I do something wrong ?

Can somebody give me any help?

Thanks,
It's returning a 2D array of char*. You need to work out what the indexes are, can't help you with that.
Topic archived. No new replies allowed.