首页 \ 问答 \ 分片集合中mongodb中的聚合管道(Aggregation Pipeline in mongodb in sharded collection)

分片集合中mongodb中的聚合管道(Aggregation Pipeline in mongodb in sharded collection)

只是提到Mongodb聚合链接https://docs.mongodb.com/v3.2/aggregation/#aggregation-pipeline ,它提到了

 "The aggregation pipeline can operate on a sharded collection."

在此处输入图像描述

请知道如果数据库是分片的,那么数据库中的所有集合都将被分片。 另外请确认,如果分片聚合查询将在许多服务器中运行,并快速交付结果。 如果是这样,聚合查询的功能如何。

问候

短剑的一种


Just referring to Mongodb aggregation link https://docs.mongodb.com/v3.2/aggregation/#aggregation-pipeline and it mentions that

 "The aggregation pipeline can operate on a sharded collection."

enter image description here

Please lemme know If database is sharded then all the collections in the database will be sharded. Also Please confirm that if sharded the aggregate query will be run in many servers, and delivery the results fast. If so how the aggregation query functions.

Regards

Kris


原文:
更新时间:2022-10-16 21:10

最满意答案

我假设您使用的是ASP.NET AJAX,而不是jQuery或其他第三方JavaScript库。

ASP.NET AJAX故障回调只接受一个参数。 从MSDN,示例失败回调将如下所示:

function wcfFailCallback(error)
{
    var stackTrace = error.get_stackTrace();
    var message = error.get_message();
    var statusCode = error.get_statusCode();
    var exceptionType = error.get_exceptionType();
    var timedout = error.get_timedOut();

    // Display the error.    
    var RsltElem = 
        document.getElementById("Results");
    RsltElem.innerHTML = 
        "Stack Trace: " +  stackTrace + "<br/>" +
        "Service Error: " + message + "<br/>" +
        "Status Code: " + statusCode + "<br/>" +
        "Exception Type: " + exceptionType + "<br/>" +
        "Timedout: " + timedout;
}

因此, wcfFailCallback函数接受一个error参数,该参数具有许多属性,可以为您提供有关失败的信息。

MSDN上的完整文章就在这里 。 它介绍了有关如何将WCF服务连接到ASP.NET AJAX客户端的大量详细信息。

我希望这有帮助!! 如果还有其他问题或者我没有完全理解您的问题,请告诉我,我会相应更新我的答案。


I'm assuming you're using ASP.NET AJAX and not jQuery or some other 3rd party JavaScript library.

The ASP.NET AJAX failure callback takes a single parameter. From MSDN, a sample failure callback would look like this:

function wcfFailCallback(error)
{
    var stackTrace = error.get_stackTrace();
    var message = error.get_message();
    var statusCode = error.get_statusCode();
    var exceptionType = error.get_exceptionType();
    var timedout = error.get_timedOut();

    // Display the error.    
    var RsltElem = 
        document.getElementById("Results");
    RsltElem.innerHTML = 
        "Stack Trace: " +  stackTrace + "<br/>" +
        "Service Error: " + message + "<br/>" +
        "Status Code: " + statusCode + "<br/>" +
        "Exception Type: " + exceptionType + "<br/>" +
        "Timedout: " + timedout;
}

So the wcfFailCallback function takes an error parameter, which has a number of properties that provide you information about what failed.

The full article on MSDN is here. It goes into some decent amount of details about how to hook up WCF services to ASP.NET AJAX clients.

I hope this helps!! If there are other questions or if I didn't fully understand your question, let me know and I'll update my answer accordingly.

相关问答

更多
  • 不确定这是否是你想要的,但从你的问题我可以理解,这似乎是你需要的: 由于您需要在整个项目中使用变量,因此您可以在类的开头声明InstanceContext和Client。 InstanceContext site; PostingContractClient client; 按照form_Load方法, site = new InstanceContext(null, new mainForm(backgroundFormObject)); client = new PostingContractClie ...
  • 该消息应包含wcf期望的原始肥皂。 您可以在现有的c#客户端上使用WCF日志记录或Fiddler来获取它。 The message should contain the raw soap wcf expects. You can get it by using WCF logging or Fiddler on an existing working c# client.
  • 如果您只是需要查看错误消息以进行故障排除,则可以在app.config中设置IncludeExceptionDetailInFaults属性。 这将为您提供完整的异常详细信息,包括客户端上的堆栈跟踪。 但是,请注意,异常详细信息可能包含敏感信息,因此请勿在不了解风险的情况下将其保留在生产系统中。 如果您想更进一步,可以实现IErrorHandler接口。 您可以将此作为单点记录异常或将其转换为已发布的故障合同。 If you just need to see the error message for tr ...
  • 你是否试图捕获一个FaultException? catch (FaultException ex) { AppManager.LogException(ex); } catch (FaultException unknownFault) { AppManager.LogException(unknownFault); } 您需要在合同中包含FaultContractAttribute以使其正常工作。 Thanks for all your answers. My ...
  • 是的,有可能,您只需要将Json Endpoint添加到服务合同中并转换您的方法以返回Json数据, 例如, [OperationContract] [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, UriTemplate = "login/{username}/{password}",BodyStyle = WebMessageBodyStyle.Bare)] UserAuth login(str ...
  • 这是一个简单的JavaScript ping函数,用于连接到WCF服务 - basicHttpbinding w / SOAP消息和DataContract。 从这样的事情,你应该能够适应自己的要求。