Tag: azure storage blobs

AzureMobileService:将数据插入到表中会产生exception

我是新手来实施Azure移动服务。 我参考了Azure提供的ToDoItem演示。 以同样的方式,我已经为我自己的应用程序创建类User。 然后我将数据插入到MobileServiceTable中,但它给出了如下错误: {“message”:”The operation failed with the following error: ‘A null store-generated value was returned for a non-nullable member ‘CreatedAt’ of type ‘CrazyLabApp.Models.User’.’.”} 我没有创建任何这样的字段,因为它不是在ToDoItem演示中创建的。 我已经看到MobileServiceTable创建了4个默认字段。 createdAt是其中一个领域。 我很想知道我做错了什么。 检查我的以下用户类: public class User { @com.google.gson.annotations.SerializedName(“id”) private String ServiceUserId; @com.google.gson.annotations.SerializedName(“email”) private String Email; @com.google.gson.annotations.SerializedName(“firstname”) private String FirstName; @com.google.gson.annotations.SerializedName(“lastname”) private String LastName; @com.google.gson.annotations.SerializedName(“profilepic”) private String ProfilePic; @com.google.gson.annotations.SerializedName(“introduction”) […]

通过代理服务器Microsoft Azure Storage SDK for Java连接到Azure存储帐户

在我们的项目中,我们需要通过代理服务器(squid)访问Blob存储。 我们计划使用Microsoft Azure Storage SDK for Java 2.2.0版 。 但看起来API并未提供设置代理。 我可以让它通过代理的唯一方法是设置系统属性 System.setProperty(“http.proxyHost”, “127.0.0.1”); System.setProperty(“http.proxyPort”, “3128”); 但这会影响我的JVM上运行的所有服务,这会损害其他不应通过代理服务器的服务。 查看java代码,它看起来像com.microsoft.azure.storage.core.BaseRequest.createURLConnection(URI,RequestOptions,UriQueryBuilder,OperationContext)。 在没有代理的情况下调用java.net.URL.openConnection()。 使用java.net.URL.openConnection(Proxy)可以提供所需的支持吗? 它看起来与我有关,这是不支持的? 我在这里想念一下吗? 更新:我在azure-storage-java git中打开了一个问题 ,我很乐意得到你的输入,因为我想建议一个拉请求。

来自android示例的Azure存储块blob上传

我使用Android应用程序中的以下代码将blob上传到Azure Blob存储。 注意:下面的sasUrl参数是从我的Web服务获取的签名URL: // upload file to azure blob storage private static Boolean upload(String sasUrl, String filePath, String mimeType) { try { // Get the file data File file = new File(filePath); if (!file.exists()) { return false; } String absoluteFilePath = file.getAbsolutePath(); FileInputStream fis = new FileInputStream(absoluteFilePath); int bytesRead = 0; ByteArrayOutputStream bos = new […]

使用Spark从Azure Blob读取数据

我在通过火花流从azure色斑点中读取数据时遇到了问题 JavaDStream lines = ssc.textFileStream(“hdfs://ip:8020/directory”); 上面的代码适用于HDFS,但无法从Azure blob读取文件 https://blobstorage.blob.core.windows.net/containerid/folder1/ 以上是azure UI中显示的路径,但这不起作用,我错过了什么,我们如何访问它。 我知道Eventhub是流数据的理想选择,但我目前的情况要求使用存储而不是队列