Package org.apache.sysds.hops.fedplanner
Class FederatedPlannerLogger
java.lang.Object
org.apache.sysds.hops.fedplanner.FederatedPlannerLogger
Unified utility class for logging federated planner information.
Provides methods to log hop details including privacy constraints and FType information,
as well as methods to print detailed FederatedMemoTable tree structures and cost analysis.
This class integrates the functionality of the former FederatedMemoTablePrinter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidlogBasicHopInfo(Hop hop, String logPrefix) Logs basic hop information without privacy and FType detailsstatic voidlogConflictResolutionError(long hopID, Object fedPlan, String logPrefix) Logs detailed error information for conflict resolution scenariosstatic voidlogDataOpFTypeDebug(Hop hop, FTypes.FType fType, String opType, String reason) Logs FType debug information for DataOp operations (FEDERATED, TRANSIENTWRITE, TRANSIENTREAD)static voidlogDetailedHopInfo(Hop hop, Map<Long, FTypes.Privacy> privacyConstraintMap, Map<Long, FTypes.FType> fTypeMap, String logPrefix) Logs detailed hop information with dimension and data typestatic voidlogFilteredChildHopsDebug(String hopName, long hopID, List<Hop> filteredChildHops, boolean isEmptyFilteredChildHops, String logPrefix) Logs debugging information for filtered child hops during TransRead rewiringstatic voidlogFTypeMismatchError(Hop hop, List<Hop> filteredChildHops, Map<Long, FTypes.FType> fTypeMap, FTypes.FType expectedFType, FTypes.FType mismatchedFType, int mismatchIndex) Logs detailed FType mismatch error information for TransRead hopstatic voidlogGetFederatedTypeDebug(Hop hop, FTypes.FType returnFType, String reason) Logs debug information for getFederatedType functionstatic voidlogHopErrorDetails(Hop hop, String logPrefix, String additionalMessage) Logs detailed hop error information with complete hop detailsstatic voidlogHopInfo(Hop hop, Map<Long, FTypes.Privacy> privacyConstraintMap, Map<Long, FTypes.FType> fTypeMap, String logPrefix) Logs hop information including name, hop ID, child hop IDs, privacy constraint, and ftypestatic voidlogNullChildPlanDebug(org.apache.commons.lang3.tuple.Pair<Long, FEDInstruction.FederatedOutput> childFedPlanPair, FederatedMemoTable.FedPlan optimalPlan, FederatedMemoTable memoTable) Logs detailed null child plan debugging informationstatic voidlogNullFedPlanError(long hopID, String logPrefix) Logs error information for null fed plan scenariosstatic voidlogTransReadRewireDebug(String hopName, long hopID, List<Hop> childHops, boolean isEmptyChildHops, String logPrefix) Logs debugging information for TransRead hop rewiring processstatic voidprintFedPlanTree(FederatedMemoTable.FedPlan rootFedPlan, Set<Long> rootHopStatSet, FederatedMemoTable memoTable, double additionalTotalCost) Recursively prints a tree representation of the DAG starting from the given root FedPlan.
-
Constructor Details
-
FederatedPlannerLogger
public FederatedPlannerLogger()
-
-
Method Details
-
logHopInfo
public static void logHopInfo(Hop hop, Map<Long, FTypes.Privacy> privacyConstraintMap, Map<Long, FTypes.FType> fTypeMap, String logPrefix) Logs hop information including name, hop ID, child hop IDs, privacy constraint, and ftype- Parameters:
hop- The hop to log information forprivacyConstraintMap- Map containing privacy constraints for hopsfTypeMap- Map containing FType information for hopslogPrefix- Prefix string to identify the log source
-
logBasicHopInfo
Logs basic hop information without privacy and FType details- Parameters:
hop- The hop to log information forlogPrefix- Prefix string to identify the log source
-
logDetailedHopInfo
public static void logDetailedHopInfo(Hop hop, Map<Long, FTypes.Privacy> privacyConstraintMap, Map<Long, FTypes.FType> fTypeMap, String logPrefix) Logs detailed hop information with dimension and data type- Parameters:
hop- The hop to log information forprivacyConstraintMap- Map containing privacy constraints for hopsfTypeMap- Map containing FType information for hopslogPrefix- Prefix string to identify the log source
-
logNullFedPlanError
Logs error information for null fed plan scenarios- Parameters:
hopID- The hop ID that caused the errorlogPrefix- Prefix string to identify the log source
-
logConflictResolutionError
Logs detailed error information for conflict resolution scenarios- Parameters:
hopID- The hop ID that caused the errorfedPlan- The federated plan with error detailslogPrefix- Prefix string to identify the log source
-
logGetFederatedTypeDebug
Logs debug information for getFederatedType function- Parameters:
hop- The hop being analyzedreturnFType- The FType that will be returnedreason- The reason for the FType decision
-
logHopErrorDetails
Logs detailed hop error information with complete hop details- Parameters:
hop- The hop that caused the errorlogPrefix- Prefix string to identify the log sourceadditionalMessage- Additional error message
-
logNullChildPlanDebug
public static void logNullChildPlanDebug(org.apache.commons.lang3.tuple.Pair<Long, FEDInstruction.FederatedOutput> childFedPlanPair, FederatedMemoTable.FedPlan optimalPlan, FederatedMemoTable memoTable) Logs detailed null child plan debugging information- Parameters:
childFedPlanPair- The child federated plan pair that is nulloptimalPlan- The current optimal plan (parent)memoTable- The memo table for lookups
-
logTransReadRewireDebug
public static void logTransReadRewireDebug(String hopName, long hopID, List<Hop> childHops, boolean isEmptyChildHops, String logPrefix) Logs debugging information for TransRead hop rewiring process- Parameters:
hopName- The name of the TransRead hophopID- The ID of the TransRead hopchildHops- List of child hops found during rewiringisEmptyChildHops- Whether the child hops list is emptylogPrefix- Prefix string to identify the log source
-
logFilteredChildHopsDebug
public static void logFilteredChildHopsDebug(String hopName, long hopID, List<Hop> filteredChildHops, boolean isEmptyFilteredChildHops, String logPrefix) Logs debugging information for filtered child hops during TransRead rewiring- Parameters:
hopName- The name of the TransRead hophopID- The ID of the TransRead hopfilteredChildHops- List of filtered child hopsisEmptyFilteredChildHops- Whether the filtered child hops list is emptylogPrefix- Prefix string to identify the log source
-
logFTypeMismatchError
public static void logFTypeMismatchError(Hop hop, List<Hop> filteredChildHops, Map<Long, FTypes.FType> fTypeMap, FTypes.FType expectedFType, FTypes.FType mismatchedFType, int mismatchIndex) Logs detailed FType mismatch error information for TransRead hop- Parameters:
hop- The TransRead hop with FType mismatchfilteredChildHops- List of filtered child hopsfTypeMap- Map containing FType information for hopsexpectedFType- The expected FTypemismatchedFType- The mismatched FTypemismatchIndex- The index where mismatch occurred
-
logDataOpFTypeDebug
Logs FType debug information for DataOp operations (FEDERATED, TRANSIENTWRITE, TRANSIENTREAD)- Parameters:
hop- The DataOp hop being analyzedfType- The FType that was determined for this operationopType- The operation type (FEDERATED, TRANSIENTWRITE, TRANSIENTREAD)reason- The reason for the FType decision
-
printFedPlanTree
public static void printFedPlanTree(FederatedMemoTable.FedPlan rootFedPlan, Set<Long> rootHopStatSet, FederatedMemoTable memoTable, double additionalTotalCost) Recursively prints a tree representation of the DAG starting from the given root FedPlan. Includes information about hopID, fedOutType, TotalCost, SelfCost, and NetCost for each node. Additionally, prints the additional total cost once at the beginning.- Parameters:
rootFedPlan- The starting point FedPlan to printrootHopStatSet- Set of root hop statisticsmemoTable- The memoization table containing FedPlan variantsadditionalTotalCost- The additional cost to be printed once
-