Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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;
string source = 2; // partitioned or unpartitioned?
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);
//Get the block locations of the Parquet file in HDFS
rpc BlockLocations (BlockLocationsReq) returns (BlockLocationsResp);
//Classify the data in input.data based on county_code, and save each county_code as a separate Parquet file.
rpc PartitionByCounty (Empty) returns (StatusString);
//Calculate the average loan amount for a given county_code
rpc CalcAvgLoan (CalcAvgLoanReq) returns (CalcAvgLoanResp);
}