2013-01-04 2 views
0

HTML 양식 입력에서 사용 파일 : 파일에서GAE 맵리 듀스 - 나는 다음 단계와 맵리 듀스 작업을 수행하고자하는

1)지도 입력 HTML 양식입니다

2) 줄이고 새로운 만들기 파일 축소판에서

다음은 현재 내 파이프 라인 설정 방법입니다. 주요 질문은 파일을 RecordsReader에 전달하는 방법입니다.

RecordsReader에는 "읽을 파일이 포함 된 문자열 또는 읽을 여러 파일 문자열이 들어있는 목록"중 하나를 전달할 매개 변수 파일이 있습니다.

class EPNPipeline(base_handler.PipelineBase): 
    def run(self, filekey): 
     logging.debug("filename is %s" % filekey) 
     output = yield mapreduce_pipeline.MapreducePipeline(
      "EPN", 
      "map_process_epn", 
      "reduce_process_epn", 
      "mapreduce.input_readers.RecordsReader", 
      "mapreduce.output_writers.BlobstoreOutputWriter", 
      mapper_params={ 
       "files": filekey,     
      }, 
      reducer_params={ 
       "mime_type": "text/plain", 
      }, 
      shards=24) 
     yield StoreOutput("EPN", filekey, output) 

-Google 나는 파일 객체로하고 문자열 표현하지만, 어느 작품의 파일을 통과하려고하고 내가 좋아하는 것처럼 다른 입력/출력 리더/라이터를 사용하는 방법에 대한 많은 문서가 없습니다.

어떤 도움이나 조언을 부탁드립니다.

감사

답변

1

는 샘플 애플리케이션은 in the documentation가이 작업을 수행하는 방법을 정확하게 보여줍니다 설명했다. 파일을 blobstore에 업로드 한 다음 blob 키를 mapreduce에 전달해야합니다.

관련 문제