(client *Client, resp *admin.QueryBulkLoadResponse, partitionIndex int, detailed bool)
| 335 | } |
| 336 | |
| 337 | func PrintSingleIngesting(client *Client, resp *admin.QueryBulkLoadResponse, partitionIndex int, detailed bool) { |
| 338 | stateMap := resp.GetBulkLoadStates()[partitionIndex] |
| 339 | if !detailed { |
| 340 | PrintSingleSummary(client, resp.GetAppName(), int32(partitionIndex), resp.GetPartitionsStatus()[partitionIndex]) |
| 341 | return |
| 342 | } |
| 343 | var sList []interface{} |
| 344 | type singleStruct struct { |
| 345 | Node string `json:"NodeAddress"` |
| 346 | PStatus string `json:"PartitionStatus"` |
| 347 | IStatus string `json:"IngestionStatus"` |
| 348 | } |
| 349 | for node, state := range stateMap { |
| 350 | sList = append(sList, singleStruct{ |
| 351 | Node: node.String(), |
| 352 | PStatus: resp.GetPartitionsStatus()[partitionIndex].String(), |
| 353 | IStatus: state.GetIngestStatus().String(), |
| 354 | }) |
| 355 | } |
| 356 | util.SortStructsByField(sList, "Node") |
| 357 | tabular.New(client, sList, func(tbWriter *tablewriter.Table) { |
| 358 | tbWriter.SetFooter([]string{ |
| 359 | fmt.Sprintf("Table(%s) Partition[%d]", resp.GetAppName(), partitionIndex), |
| 360 | fmt.Sprintf("Table(%s)", resp.GetAppStatus().String()), |
| 361 | "", |
| 362 | }) |
| 363 | }).Render() |
| 364 | } |
| 365 | |
| 366 | func PrintSingleCleanupFlag(client *Client, resp *admin.QueryBulkLoadResponse, partitionIndex int, detailed bool) { |
| 367 | stateMap := resp.GetBulkLoadStates()[partitionIndex] |
no test coverage detected