public override void Unpack(string[] keywords) { clusterMode = ClusterMode.None; if (HasFeature(keywords, DefineFeature._TEXTURECLUSTER2)) { clusterMode = ClusterMode.TwoVariants; } else if (HasFeature(keywords, DefineFeature._TEXTURECLUSTER3)) { clusterMode = ClusterMode.ThreeVariants; } else if (HasFeature(keywords, DefineFeature._STOCHASTIC)) { clusterMode = ClusterMode.Stochastic; perTexStochastic = HasFeature(keywords, DefineFeature._PERTEXSTOCHASTIC); } if (clusterMode != ClusterMode.None) { clusterNoiseUV = HasFeature(keywords, DefineFeature._TEXTURECLUSTERTRIPLANARNOISE) ? ClusterNoiseUV.Triplanar : ClusterNoiseUV.UV; perTexClusterContrast = HasFeature(keywords, DefineFeature._PERTEXCLUSTERCONTRAST); perTexClusterBoost = HasFeature(keywords, DefineFeature._PERTEXCLUSTERBOOST); secondNoise = HasFeature(keywords, DefineFeature._TEXTURECLUSTERNOISE2); } }
/// <summary> /// Default contructor /// </summary> public GraphvizGraph() { m_Url = null; m_BackgroundColor = Color.White; m_IsCentered = false; m_ClusterRank = ClusterMode.Local; m_Comment = null; m_IsCompounded = false; m_IsConcentrated = false; m_Font = null; m_FontColor = Color.Black; m_Label = null; m_LabelJustification = LabelJustification.C; m_LabelLocation = LabelLocation.B; m_Layers = new GraphvizLayerCollection(); m_McLimit = 1.0; m_NodeSeparation = 0.25; m_IsNormalized = false; m_NsLimit = -1; m_NsLimit1 = -1; m_OutputOrder = OutputMode.BreadthFirst; m_PageSize = new Size(0, 0); m_PageDirection = PageDirection.BL; m_Quantum = 0; m_RankSeparation = 0.5; m_Ratio = RatioMode.Auto; m_IsReMinCross = false; m_Resolution = 0.96; m_Rotate = 0; m_SamplePoints = 8; m_SearchSize = 30; m_Size = new Size(0, 0); m_StyleSheet = null; }
/// <summary> /// Default contructor /// </summary> public GraphvizGraph() { m_Url=null; m_BackgroundColor=Color.White; m_IsCentered=false; m_ClusterRank=ClusterMode.Local; m_Comment=null; m_IsCompounded=false; m_IsConcentrated=false; m_Font=null; m_FontColor=Color.Black; m_Label=null; m_LabelJustification=LabelJustification.C; m_LabelLocation=LabelLocation.B; m_Layers=new GraphvizLayerCollection(); m_McLimit=1.0; m_NodeSeparation=0.25; m_IsNormalized=false; m_NsLimit=-1; m_NsLimit1=-1; m_OutputOrder=OutputMode.BreadthFirst; m_PageSize=new Size(0,0); m_PageDirection=PageDirection.BL; m_Quantum=0; m_RankSeparation=0.5; m_Ratio = RatioMode.Auto; m_IsReMinCross=false; m_Resolution=0.96; m_Rotate=0; m_SamplePoints=8; m_SearchSize=30; m_Size=new Size(0,0); m_StyleSheet=null; }
private string GetCurrentClusterModeText(ClusterMode mode) { var msg = SR.AppName; switch (mode) { case ClusterMode.OneNode: msg = SR.CurrentClusterOneNodeText; break; case ClusterMode.FiveNode: msg = SR.CurrentClusterFiveNodeText; break; case ClusterMode.MeshOneNode: msg = SR.CurrentClusterMeshOneNodeText; break; case ClusterMode.MeshFiveNode: msg = SR.CurrentClusterMeshFiveNodeText; break; default: break; } return(msg); }
public static Task <CommandExecutionResult> SetupClusterAsync(ClusterMode clusterMode) { return(Task.Run( () => { String setupClusterScriptPath = ProjectUtility.GetSetupClusterScriptPath(); string arguments = String.Format("-Auto -PathToClusterLogRoot {0} -SetupLogFileName {1} ", ProjectUtility.DevClusterLogRoot, ProjectUtility.DefaultSetupLogFileName); var timeout = ProjectUtility.ClusterSetupTimeout; switch (clusterMode) { case ClusterMode.OneNode: arguments += "-CreateOneNodeCluster"; break; case ClusterMode.MeshOneNode: arguments += "-CreateOneNodeCluster -CreateMeshCluster"; timeout = ProjectUtility.MeshClusterSetupTimeout; break; case ClusterMode.MeshFiveNode: arguments += "-CreateMeshCluster"; timeout = ProjectUtility.MeshClusterSetupTimeout; break; } return ProjectUtility.ExecutePowerShellScript(setupClusterScriptPath, arguments, timeout); })); }
public override void DrawFeatureGUI(Material mat) { clusterMode = (ClusterMode)EditorGUILayout.EnumPopup(CShaderClusters, clusterMode); if (clusterMode != ClusterMode.None && clusterMode != ClusterMode.Stochastic) { EditorGUI.indentLevel++; clusterNoiseUV = (ClusterNoiseUV)EditorGUILayout.EnumPopup(CClusterNoiseUVs, clusterNoiseUV); secondNoise = EditorGUILayout.Toggle(CClusterNoise2, secondNoise); EditorGUI.indentLevel--; } }
public static Task <CommandExecutionResult> ResetClusterAsync(ClusterMode clusterMode) { return(RemoveClusterAsync().ContinueWith( cleanTask => { // FabricHost child processes sometime takes little while to go away. // Wait for 15 seconds before starting setup. Task.Delay(15000).Wait(); return SetupClusterAsync(clusterMode).Result; })); }
public ClusterInfo WithClusterMode(ClusterMode clusterMode) { this._clusterMode = clusterMode; if (this.CustomTags == null) { this.CustomTags = new Dictionary <string, string>(); } if (this.SparkConfiguration == null) { this.SparkConfiguration = new Dictionary <string, string>(); } switch (clusterMode) { case ClusterMode.HighConcurrency: this.CustomTags["ResourceClass"] = "Serverless"; this.SparkConfiguration["spark.databricks.cluster.profile"] = "serverless"; this.SparkConfiguration.Remove("spark.master"); break; case ClusterMode.SingleNode: this.CustomTags["ResourceClass"] = "SingleNode"; this.SparkConfiguration["spark.databricks.cluster.profile"] = "singleNode"; this.SparkConfiguration["spark.master"] = "local[*]"; this.NumberOfWorkers = 0; break; default: // Standard mode this.CustomTags.Remove("ResourceClass"); this.SparkConfiguration.Remove("spark.databricks.cluster.profile"); this.SparkConfiguration.Remove("spark.master"); break; } var allowedReplLang = DatabricksAllowedReplLang(_enableTableAccessControl, clusterMode); if (string.IsNullOrEmpty(allowedReplLang)) { this.SparkConfiguration.Remove("spark.databricks.repl.allowedLanguages"); } else { this.SparkConfiguration["spark.databricks.repl.allowedLanguages"] = allowedReplLang; } return(this); }
public ClusterInfo WithClusterMode(ClusterMode clusterMode) { this._clusterMode = clusterMode; if (this.CustomTags == null) { this.CustomTags = new Dictionary <string, string>(); } if (this.SparkConfiguration == null) { this.SparkConfiguration = new Dictionary <string, string>(); } if (clusterMode == ClusterMode.HighConcurrency) { this.CustomTags["ResourceClass"] = "Serverless"; this.SparkConfiguration["spark.databricks.cluster.profile"] = "serverless"; } else { this.CustomTags.Remove("ResourceClass"); this.SparkConfiguration.Remove("spark.databricks.cluster.profile"); } var allowedReplLang = DatabricksAllowedReplLang(_enableTableAccessControl, clusterMode); if (string.IsNullOrEmpty(allowedReplLang)) { this.SparkConfiguration.Remove("spark.databricks.repl.allowedLanguages"); } else { this.SparkConfiguration["spark.databricks.repl.allowedLanguages"] = allowedReplLang; } return(this); }
private async Task SetupClusterAsync(ClusterMode clusterMode) { if (!ClusterManager.IsClusterSetup) { this.trayIcon.ContextMenuStrip.Enabled = false; this.ShowBalloonTip(SR.SetupClusterBalloonTip, ToolTipIcon.Info); this.SetTrayIconText(SR.SetupClusterToolTip); await this.PerformOperationWithRetry( () => ClusterManager.SetupClusterAsync(clusterMode), SR.ClusterSetupSuccessBalloonTip, WrapToolTipWithLogDetails(SR.ErrorSettingUpClusterBalloonTip), WrapToolTipWithLogDetails(SR.ClusterSetupFailedBalloonTip)); this.appMgr.RecordClusterReset(); this.SetTrayIconText(this.GetCurrentClusterModeText(clusterMode)); this.trayIcon.ContextMenuStrip.Enabled = true; } else { this.ShowBalloonTip(SR.ClusterAlreadySetupBalloonTip, ToolTipIcon.Info); } }
private static string DatabricksAllowedReplLang(bool enableTableAccessControl, ClusterMode clusterMode) => enableTableAccessControl ? "python,sql" : (clusterMode == ClusterMode.HighConcurrency ? "sql,python,r" : null);
public void AddIndex(string name, ClusterMode cluster, IndexMode mode, IndexType type, params object[] columns) { Index index = new Index(name, cluster, mode, type, columns); AddIndex(index); }
public void AddIndex(string Name, ClusterMode Cluster, IndexMode Mode, IndexType Type, params object[] Columns) { Index index = new Index(Name, Cluster, Mode, Type, Columns); AddIndex(index); }