Import _Installation.json of Parse.com Export - parse-platform

how can I import the exported _Installation-data? When I try to set the classname to _Installation, I just get the error "cannot import into this special class"

Workaround so far: Iterating over the exported _Installation.json and recreating the objects via POST against https://api.parse.com/1/classes/_Installation .
This is no real backup restore as this creates new objectIds, createdAts and updatedAts but better than nothing.

Meanwhile, this feature has been added.

Related

Edit State File of ElasticSearch 7.3

I have one ElasticNode 7.3.2 in my cluster which has crashed and since then isn't able to restart, but still contains important data (last replicas are on this node).
Caused by: java.io.IOException: failed to find metadata for existing index indexname-2019.06.23 [location: ORVU14kLSf6kIv8ULliijA, generation: 178]
i dont care about this special index, can i just remove this one from the state file? I already tried to remove it via an HexEditor, but then he complains about are not valid hash-checksum ;)
I already tried to decode it via SMILE, but it seems that *.st files dont follow the exact specifications only partially.
Does someone has an idea? Or a good tool to edit it?
Thanks
I had a similar case in which I corrupted my index settings with invalid similarity settings. Unfortunately, the settings were written to file by ES without validity check and afterwards I could not open the index again. So I got the index meta data from data/nodes/0/indices/<index UID>/_state/state-xx.st and figured out how to load it, change it and store it back again. I used ES 5.4 so the code I give here will be slightly different in ES 7.x. It goes like this:
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Paths;
public class RepairIndexSettings {
public static void main(String args[]) throws IOException {
// Load the existing, possibly corrupt index file
IndexMetaData d = IndexMetaData.FORMAT.read(NamedXContentRegistry.EMPTY, Paths.get( "indexstaterepair","_state", "state-11.st"));
// Create new IndexMetaData by copying all the valid meta data from the original and removing or fixing
// the corrupt settings.
Settings.Builder sb = Settings.builder();
for (String key : d.getSettings().keySet()) {
if (!key.contains("similarity"))
sb.put(key, d.getSettings().get(key));
}
IndexMetaData newd = IndexMetaData.builder(d).settings(sb).build();
// Write the new index state to file
IndexMetaData.FORMAT.write(newd, Paths.get("indexstaterepair"));
}
}
I replaced the original state file with the new one and could open and use the index normally afterwards.
You would have to use another MetaData subclass but I think it should be quite similar otherwise.
No, there's no way to edit any files inside the data directory by hand. If you're getting an exception like failed to find metadata for existing index then there's something quite wrong with your storage, or something other than Elasticsearch has modified its contents. In either case, this has corrupted this node. The best path forward is to wipe the data path and start the node afresh so that Elasticsearch can rebuild any lost shards from elsewhere in the cluster or else restore them from a recent snapshot.

Core Data code generation causes build failure

I’m using the new Xcode 8 feature of code generation for my Core Data model using Class Definition as the Codegen option.
When I build I get the following output for each of my entities:
<unknown>:0: error: no such file or directory: ‘/path/to/DerivedSources/CoreDataGenerated/Model/.Entity+CoreDataClass.swift'
<unknown>:0: error: no such file or directory: ‘/path/to/DerivedSources/CoreDataGenerated/Model/.Entity+CoreDataProperties.swift’
...
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
On inspecting the files I can see the following:
Entity+CoreDataClass.swift:
import Foundation
import CoreData
public class Entity: NSManagedObject {
}
Entity+CoreDataProperties.swift
import Foundation
import CoreData
import
extension Entity {
#nonobjc public class func fetchRequest() -> NSFetchRequest<Entity> {
return NSFetchRequest<Entity>(entityName: “Entity");
}
#NSManaged public var title: String?
}
In the second, the obvious thing that shouldn’t be there is the empty import statement, which I’m guessing is causing the crash.
Could I be doing something wrong? Is this a bug?
I’ve tried all the usual, clean, clean build folder, restart Xcode/Mac with no luck.
The Module field of the entity in the Data Model inspector had a value in it, I deleted this so now it’s empty and the placeholder reads “Global namespace”. This seems to have worked!
Core Data is heavily string-based. Using names such as "Entity" for your entities can lead to unexpected results. Also avoid using names in your data model such as "description", or "item" or "attribute" etc. If you do want to use those names, prefix them: names like "My_entity" or "ACEntity" are fine.

I can't import com.parse.ParseImageView

I've been trying to import com.parse.ParseImageView so i can display image queried from parse. But I get this error in my xml file
The following classes could not be found:
- com.parse.ParseImageView
Is ParseImageView no longer supported ? What is the alternative way to display image from parse database? Thanks

Hbase Import Table Error

I was trying to import the data from one hbase(v0.98.4) to another hbase(v0.98.13).
I have exported the data using the below command -
hbase org.apache.hadoop.hbase.mapreduce.Driver export 'tblname' /path/
But I am not able to import it using the below command -
hbase org.apache.hadoop.hbase.mapreduce.Driver import 'tblname' /hdfs/path/
I get the below deprecation messages as well as an Exception thrown -
Is it becoz of version conflicts between source db and destination db?
I happen to solve it. All I had to do was create an empty table with same metadata and then import it. :)
Try using the commands here for Hbase versions above 0.94. May be you are using generalized Map reduce class and giving export and import as arguments, when the actual classes Export and Import are present. Hope it helps. Happy coding

Why can't Processing 2.0b8 find a class or type named "Set"?

I'm trying to walk through a Processing tutorial and hitting a wall. I can't even run the sample starter code --I get an error: Cannot find a class or type named "Set" and this line comes back highlighted:
Set<String> tags = le.getCustomElements().getTags();
Am I missing something already?
Some default imports has gone in 2.0. Try
import java.util.*
at the beginning of the code

Resources