Skip to content
Snippets Groups Projects
lender.proto 803 B
Newer Older
wyang338's avatar
wyang338 committed
syntax="proto3";

message Empty{}

message BlockLocationsReq {
  string path = 1;
}

message BlockLocationsResp {
  map <string, int32> block_entries = 1;  // list of block locations
  string error = 2;
}

message CalcAvgLoanReq {
  int32 county_code = 1;
}

message CalcAvgLoanResp {
  int32 avg_loan = 1;
TYLER CARAZA-HARTER's avatar
TYLER CARAZA-HARTER committed
  string source = 2; // create, reuse, or recreate
wyang338's avatar
wyang338 committed
  string error = 3;
}

message StatusString{
  string status= 1;
}

service Lender {
  //Load input.data from SQL server and upload it to HDFS
  rpc DbToHdfs (Empty) returns (StatusString);
TYLER CARAZA-HARTER's avatar
TYLER CARAZA-HARTER committed

wyang338's avatar
wyang338 committed
  //Get the block locations of the Parquet file in HDFS
  rpc BlockLocations (BlockLocationsReq) returns (BlockLocationsResp);
TYLER CARAZA-HARTER's avatar
TYLER CARAZA-HARTER committed

wyang338's avatar
wyang338 committed
  //Calculate the average loan amount for a given county_code
  rpc CalcAvgLoan (CalcAvgLoanReq) returns (CalcAvgLoanResp);
TYLER CARAZA-HARTER's avatar
TYLER CARAZA-HARTER committed
}